2012-06-25 50 views
5

trasaction表說明字段有一定的價值,它工作正常。 描述費爾德默認值爲NULL,它不是工程..更新MySQL中的空值concat文本

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

幫助我..

回答

10

使用ifnull()

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

Documentation

+0

非常感謝..它工作正常... – Vaishu