SELECT NULL Rows with MySQL

by Pete Freitag

Need to select NULL rows with MySQL or SQL Server, here's how:

SELECT columns FROM table WHERE column IS NULL

Or to select all rows that are not null, you can use IS NOT NULL

SELECT columns FROM table WHERE column IS NOT NULL