如何更新数据库中为Null的数据

如题所述

第1个回答  2010-09-09
update 表名 set 字段 = null where id=1 --把字段数据变成null

update 表名 set 字段 = 值 where 字段 is null --改写字段为null数据

update 表名 set 字段 = null where 字段 is not null --把字段不为null变成null本回答被网友采纳
第2个回答  推荐于2018-03-22
就是个sql问题,自己写个试试

update 表名 set 字段 = null where id=1 --把字段数据变成null

update 表名 set 字段 = 值 where 字段 is null --改写字段为null数据

update 表名 set 字段 = null where 字段 is not null --把字段不为null变成null 自己去试试吧本回答被网友采纳
第3个回答  2010-09-09
update “表名” set “列名”=“值” where “列名” is null
你看行不行
注:“表名” 只是个代称 例子就是 实例数据库中的 Northwind 中 Products表
如:update products set name='no name' where name is null
就是把products表中的name 列下有空值的改为字符串no name

上面的还是比较全的 此回答只适合菜鸟,嘿嘿。希望对你有所帮助
第4个回答  2010-09-09
update NBDH_Input set fAlready=isnull(fAlready,0.00)+@fAlready,我是这么更新为空的数据的
第5个回答  2010-09-09
写个update语句啊
比如:update 表名 set 字段名=值 where 字段名=null
相似回答