Wasim A. Wasim A. - 1 year ago 133
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

Answer Source
UPDATE profile SET favourties=CONCAT(IFNULL(favourties, ''),"123") WHERE id=1
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download