Can you update field to add text to an existing text, or string ?
With a single SQL-query ?
mysql update add to text
Re: mysql update add to text
you can use concat to add to already existing string (varchar,text,...)
It doesn't work if the value is NULL,
It works with an empty string ('').
So you should replace all NULL values with empty string before.
Code: Select all
UPDATE table_name SET text_field=CONCAT(text_field,'string to add') WHERE id='1';
It works with an empty string ('').
So you should replace all NULL values with empty string before.