Concatenating null values in MySql
by Guna[ Edit ] 2014-11-07 20:35:03
if you have
null value in a column, concatenation will not work as expected. For that we can use ifnull() function.
ifnull() function takes two values and returns first value if its not null otherwise it returns second value.
Example:
update test set content=concat(ifnull(content,''),'test data') where id=1;