mysql向某一字段追加数据向null字段追加数据
该sql可以向null字段追加数据
update table
set 字段名=case when 字段名 is not null
then CONCAT(字段名,"追加的数据")
else "追加的数据" end
where id=1;
如果字段默认值为空串可以使用以下sql:
update table
set 字段名=CONCAT(字段名,"追加的数据")
where id=1;
case when then else end的初次探索
本文来自博客园,作者:zhooke,转载请注明原文链接:https://www.cnblogs.com/zhooke/p/15399365.html