Total Pageviews

ISNULL in SQL Server

ISNULL() accepts two arguments. If first argument (or expression) is 'NULL' then it returns second argument as output else it returns first argument as an output.

For example:-

SELECT ISNULL(1, 5) --> 1 will be output
SELECT ISNULL (NULL, 5) --> 5 will be output
SELECT ISNULL (NULL, NULL) --> NULL will be output
SELECT ISNULL (1, NULL) --> 1 will be output



No comments:

Post a Comment