usage of select null?

Select null is usually used in combination with EXISTS.

eg:- IF EXISTS( select null from ...)

It sets up the Exists status as true if there are records in the select query.
Check this link which has some interesting comments on the usage of select null with Exists: SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)

Leave a Comment