| title | IS NULL (Transact-SQL) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Determines whether a specified expression is null. | ||||||||||
| author | VanMSFT | ||||||||||
| ms.author | vanto | ||||||||||
| ms.reviewer | randolphwest | ||||||||||
| ms.date | 06/16/2025 | ||||||||||
| ms.service | sql | ||||||||||
| ms.subservice | t-sql | ||||||||||
| ms.topic | reference | ||||||||||
| ms.custom |
|
||||||||||
| f1_keywords |
|
||||||||||
| helpviewer_keywords |
|
||||||||||
| dev_langs |
|
||||||||||
| monikerRange | >=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric || =fabric-sqldb |
[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-FabricDW-FabricSQLDB]
Determines whether a specified expression is NULL.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
expression IS [ NOT ] NULL
Any valid expression.
-
NOTSpecifies that the Boolean result is negated. The predicate reverses its return values, returning
TRUEif the value isn'tNULL, andFALSEif the value isNULL.
Boolean
If the value of expression is NULL, IS NULL returns TRUE; otherwise, it returns FALSE.
If the value of expression is NULL, IS NOT NULL returns FALSE; otherwise, it returns TRUE.
To determine whether an expression is NULL, use IS NULL or IS NOT NULL instead of comparison operators (such as = or !=). Comparison operators return UNKNOWN when either or both arguments are NULL.
[!INCLUDE article-uses-adventureworks]
The following example returns the name and the weight for all products for which either the weight is less than 10 pounds, or the color is unknown, or NULL.
SELECT Name,
Weight,
Color
FROM Production.Product
WHERE Weight < 10.00
OR Color IS NULL
ORDER BY Name;
GOThe following example returns the full names of all employees with middle initials.
SELECT FirstName,
LastName,
MiddleName
FROM DIMEmployee
WHERE MiddleName IS NOT NULL
ORDER BY LastName DESC;- CASE (Transact-SQL)
- CREATE PROCEDURE (Transact-SQL)
- CREATE TABLE (Transact-SQL)
- Data types (Transact-SQL)
- Expressions (Transact-SQL)
- INSERT (Transact-SQL)
- LIKE (Transact-SQL)
- Operators (Transact-SQL)
- Logical Operators (Transact-SQL)
- SELECT (Transact-SQL)
- sp_help
- UPDATE (Transact-SQL)
- WHERE (Transact-SQL)