IS NOT NULL is the opposite of the IS NULL predicate, which is useful to retrieve the values that doesn't have NULL value in an expression.
Let's look into an example of AdventureWorks2019 database,
SELECT [BusinessEntityID] ,[DepartmentID] ,[ShiftID] ,[StartDate] ,[EndDate] ,[ModifiedDate] FROM [AdventureWorks2019].[HumanResources].[EmployeeDepartmentHistory] WHERE [EndDate] IS NOT NULL
Above statement returns the EmployeeDepartmentHistory which doesn't have NULL EndDate values.
Comments