select * from table 
 where col1 is null

解决方案 »

  1.   

    查出为NULL的:
    select * from table 
     where col1 is null查出非NULL的:
    select * from table 
     where col1 is not null
      

  2.   

    select isnull(name,'') name,isnull(age,'') age from table
      

  3.   

    在SQL语句中,参考wwwwwwww、genphone_ru的方法:
    select * from table1 where field1 is null
    select isnull(field1, '空空荡荡') form table1在Delphi代码中:
    if Query1.FieldNameBy('field1').IsNull then
      ShowMessage('空空荡荡');
      

  4.   

    查询为NULL
    select * from table 
     where col1 is null查询非NULL
    select * from table 
     where col1 is NOT null