在mysql中使用null值更新concat文本

Vai*_*shu 5 mysql

trasaction表描述字段有一些值,它工作正常.说明feild默认值为NULL,它不起作用..

update transaction set domain='hiox.com',description=CONACT(description,',domain swapped from hioxindia.com to hiox.com') where id=23602
Run Code Online (Sandbox Code Playgroud)

帮我..

jue*_*n d 10

用途ifnull():

update `transaction` 
   set domain='hiox.com',
   description=CONCAT(ifnull(description, ''), ',domain swapped from hioxindia.com to hiox.com') 
where id=23602
Run Code Online (Sandbox Code Playgroud)

文档