SQL查询语句如何判断一个属性的值是否为NULL?

来源:百度知道 编辑:UC知道 时间:2024/05/02 11:42:10
查询一个表,希望返回某一属性的值为空(NULL)的行,where语句应该怎么写啊?如何判断是否为NULL?
下面是我原来的写法
select * from test_table where column_1 = NULL
或者
select * from test_table where column_1 IN (NULL)
都不行。

SELECT * FROM test_table WHERE column_1 IS NULL;

如果是ACCESS请用.
select * from test_table where isnull(column_1)
别的数据库我就不大清楚了.

希望对你有所帮助

select * from test_table where column_1 is NULL 就可以了。。。

select * from test_table where column_1 is null