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; 

猜你喜欢

转载自blog.csdn.net/Wengzhengcun/article/details/84760969