MySQL Wildcards

MySQL Wildcards

MySQL Aliases

MySQL Aliases

MySQL Data Types

MySQL Data Types

MySQL Interview Questions

MySQL Interview Questions and Answers


MySQL IS NOT NULL Operator

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

MySQL IS NOT NULL OPERATOR Syntax

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

Syntax

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

Parameters:

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

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

MySQL IS NOT NULL OPERATOR example

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

Example

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

Note:

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

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