Javatpoint Logo
Javatpoint Logo

SQL Server IS NOT NULL Condition (Operator)

SQL Server IS NOT NULL condition is used to test for a NOT NULL value.

Syntax:

Parameter explanation

expression: It specifies the value to test where it is NOT NULL value.

Note: If the expression is NOT a NULL value, the condition evaluates to TRUE. If it is a NULL value, the condition evaluates to FALSE.


IS NOT NULL operator with SELECT Statement

Example:

Retrieve all employees from the table "Employees" where salary is NOT NULL value.

Output:

SQL Not null 1

IS NOT NULL operator with INSERT Statement

Example:

Output:

SQL Not null 2

IS NOT NULL operator with UPDATE Statement

Update the employees of "Employees" table and set the name "Active" where name is not null.

Example:

Output:

SQL Not null 3

Verify the example:

SQL Not null 4

IS NOT NULL operator with DELETE Statement

Update the employees of "Employees" table where name is not null.

Output:

SQL Not null 5

Verify the example:

SQL Not null 6

You can see that all employees are deleted from the table "Employees" where name is NOT NULL.


Next TopicLIKE Operator




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA