Re: Help With An UPDATE Query Please

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



UPDATE table
SET column = CONCAT(
    MID( column, 2, LENGTH( column ) - 1 ),
    MID( column, 1, 1 )
)
WHERE column LIKE 'M%'

HTH
Ignatius
_________________________
----- Original Message -----
From: "Shaun" <shaun@xxxxxxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Sent: Tuesday, February 10, 2004 14:15
Subject:  Help With An UPDATE Query Please


> Hi,
>
> How can I update a column where the first letter begins with 'M' and
adjust
> it so that column ends with 'M' instead. So something like 'UPDATE table
SET
> column = 'xxxM' WHERE column = 'Mxxx'. I hope this explains what I am
trying
> to achieve!
>
> Thanks
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux