Wasim A. Wasim A. - 6 months ago 74
MySQL Question

MYSQL Concat not working

UPDATE profile SET
WHERE id=1

i want to append 123 in favourties but if default value of favourties is set to NULL then this query will not work. What will be query if favourties is set to NULL and then append 123 with it

UPDATE profile SET favourties=CONCAT(IFNULL(favourties, ''),"123") WHERE id=1