1、将相应为null的值改为0
update test set code=case when code='' or code is null then 0 else code end,
name=case when name='' or name is null then 0 else name end,
did=case when did='' or did is null then 0 else did end
1、将相应为null的值改为0
update test set code=case when code='' or code is null then 0 else code end,
name=case when name='' or name is null then 0 else name end,
did=case when did='' or did is null then 0 else did end