bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server NULLIF() Function

Example

SELECT NULLIF(25, 25);

Definition and Usage

The NULLIF() function returns NULL if two expressions are equal, otherwise it returns the first expression.

Syntax

NULLIF(
expr1
,
expr2
)

Parameter Values

ParameterDescription
expr1, expr2Required. The two expressions to be compared

Technical Details

Works in:SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse

Previous

SQL Server ISNUMERIC() Function

Next

SQL Server SESSION_USER Function