Click to See Complete Forum and Search --> : UPDATE queries to expand upon, not replace, the existing value


callumd
10-31-2007, 01:48 AM
Hi,

I'd like to run an update query that doesn't replace the existing value in the database, but rather, simply adds the new value on the end of the existing one.

Can this be done?

NogDog
10-31-2007, 04:49 AM
Yes. In MySQL, you would use the concat() function:

UPDATE `table` SET `column` = CONCAT(`column`, ' additional text');

callumd
10-31-2007, 12:42 PM
Excellent, thanks.