MySQL Wildcards

MySQL Wildcards

MySQL Aliases

MySQL Aliases

MySQL Data Types

MySQL Data Types

MySQL Interview Questions

MySQL Interview Questions and Answers


MySQL IS NULL Operator

In MySQL IS NULL operator is used to check for NULL value in the SELECT, INSERT, UPDATE, or DELETE statement. If expression is a NULL value, the condition evaluates to TRUE otherwise FALSE.

MySQL IS NULL OPERATOR Syntax

To check for the NULL value in the field, use the following syntax:

Syntax

SELECT col1, col2, ...
FROM tablename
WHERE expression IS NULL;

Parameters:

tablename: The table name from which you want to perform IS NULL operator.

expression: To test specifies value if it is NULL value.

MySQL IS NULL OPERATOR example

The following MySQL, IS NULL operator is used to check for the NULL value in the "address" field:

Example

SELECT firstName, lastName, address FROM tblCustomerLoan
WHERE address IS NULL;

Note:

In the above example, we are performing IS NULL operator to check for the NULL value in the "address" field.

You can use MySQL Command Line Client to perform IS NULL operator to check for NULL value in the field. It will look like this: