SQL NULL
The SQL NULL
keyword allows you to ensure a given column has (or doesn't have) a value.
-- Works in PostgreSQL, MySQL, SQL Server, and Oracle
SELECT
*
FROM
tenants
WHERE
name IS NOT NULL;
tenants
table
id | name |
---|---|
1 | Albert |
2 | Marie |
3 | |
4 | Terrell |
Query results
id | name |
---|---|
1 | Albert |
2 | Marie |
4 | Terrell |