1. 程式人生 > >MySQL更新字串欄位使用單引號

MySQL更新字串欄位使用單引號

update active_task_conf set active_rule_value="[{"rpCode":"FJM685703226","weight":1}]" where id = 7; 

報語法錯誤,需要把"[{"rpCode":"FJM685703226","weight":1}]"改為單引號的'[{"rpCode":"FJM685703226","weight":1}]',即

update active_task_conf set active_rule_value='[{"rpCode":"FJM685703226","weight":1}]' where id = 7;