update data set 字段=null where 字段 is not null 那有数据的也转了update 表 set 字段=NULL where ltrim(rtrim(字段))=''
create table 测试 ( a varchar(20) )insert 测试 select char(9) union all select char(10) union all select char(13)update 测试 set a=null where ltrim(rtrim(a))=''
假如你是手工输的话,只要用ctrl+0就可以输入NULL了
Update Table Set data=null
update data set 字段=null where 字段=''
update data set 字段=null where datalength(字段)=0
skyboy0720(人是人他妈生的,妖是妖他妈生的!):update data set 字段=null where 字段 is not null如果数据有 字段 1 2 'er' 3 null 那么执行后 字段 1 null 2 null 3 null
(
a varchar(20)
)insert 测试 select char(9)
union all select char(10)
union all select char(13)update 测试 set a=null where ltrim(rtrim(a))=''
字段
1
2 'er'
3 null
那么执行后
字段
1 null
2 null
3 null