中国铁路亏损:用SQL语句,如何将一个列内所有为'null'的记录行补足为”等待中”,谢谢.

来源:百度文库 编辑:高校问答 时间:2024/04/24 23:09:24
如题,在线等,热切期盼回复.
老兄们,我都试验过你们提供的方法了,可都是报错啊.

报错为:第 12 行: ' ' 附近有语法错误。

字段为数值型:

update 表 set 字段名='等待中' where isnull(字段名,0)=0

字段为字符型:

update 表 set 字段名='等待中' where isnull(字段名,'0')='0'

update 表 set 列名='等待中' where 列名 is null

update 表 set 某字段='等待中' where 某字段 is null

注意,对text无效

update school(这个是我的表名) set school(字段名) ='毕业' where school=empty
呵呵 刚从那个题过来