sql语句怎么查询满足表中某列对应数据为空的所有行
来源:百度知道 编辑:UC知道 时间:2024/05/25 11:04:27
select * from tablename a where a.columnname is null
where 字段 is null
select columnname from table a where a.columnname is null;
select 内容 from 表名 where 字段 is null
空?是空字符串 还是 null?
select a from tablename where a is null
或者
select a from tablename where a=''
或者
select a from tablename where a='' or a is null
总有一个适合你
select 要查询的列名 from 表名 where 数据需要为空的列的名字 is null
或者
select 要查询的列名 from 表名 where 数据需要为空的列的名字 = ''
当然要查询的列可以是多列也可以是所有列
select * from 表名 where 数据需要为空的列的名字 is null