查出为NULL的: select * from table where col1 is null查出非NULL的: select * from table where col1 is not null
select isnull(name,'') name,isnull(age,'') age from table
在SQL语句中,参考wwwwwwww、genphone_ru的方法: select * from table1 where field1 is null select isnull(field1, '空空荡荡') form table1在Delphi代码中: if Query1.FieldNameBy('field1').IsNull then ShowMessage('空空荡荡');
查询为NULL select * from table where col1 is null查询非NULL select * from table where col1 is NOT null
select * from table
where col1 is null查出非NULL的:
select * from table
where col1 is not null
select * from table1 where field1 is null
select isnull(field1, '空空荡荡') form table1在Delphi代码中:
if Query1.FieldNameBy('field1').IsNull then
ShowMessage('空空荡荡');
select * from table
where col1 is null查询非NULL
select * from table
where col1 is NOT null