The REPLACE command may be what you're asking about.
SELECT REPLACE('This is a foo','foo','foobar');
will return "This is a foobar".
SELECT REPLACE(city,'Denver','Albuquerque') from foo;
In table "foo", every occurrence of "Denver" in column "city" is replaced by
"Albuquerque".
Regards,
Doug
On Fri, 15 Mar 2002 01:25:27 +0000 (GMT), GEORGE KONSTANTINOY LEKEAS wrote:
>I would like to ask a simple question about the way
>MySQL handles string variabels. Say i have a variable
>whose value is foo and I want to change it to foobar.
>
>Instead of doing it the 'typical' way, I would like to
>ask whether there is any mysql command that will allow
>me to say read the value of the variable and then
>append bar to it.
>
>I look forward to hearing from you soon.
>
>Thanks in advance.
>
>George
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php