update data set 字段=null where 字段=''

解决方案 »

  1.   

    update tbl set data=null where data=''
      

  2.   

    update data set 字段=null where 字段 is not null
      

  3.   

    update 表set 字段=NULL where 字段=''
      

  4.   

    update data set 字段=null where 字段 is not null 那有数据的也转了update 表 set 字段=NULL where ltrim(rtrim(字段))=''
      

  5.   

    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))=''
      

  6.   

    假如你是手工输的话,只要用ctrl+0就可以输入NULL了
      

  7.   

    Update Table Set data=null
      

  8.   

    update data set 字段=null where 字段=''
      

  9.   

    update data set 字段=null where datalength(字段)=0
      

  10.   

    skyboy0720(人是人他妈生的,妖是妖他妈生的!):update data set 字段=null where 字段 is not null如果数据有
       字段
    1  
    2  'er'
    3  null
    那么执行后
      字段
    1  null
    2  null
    3  null