MySQL ISNULL() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

MySQL ISNULL() Function

❮ MySQL Functions

Example

Test whether an expression is NULL:

SELECT ISNULL(NULL);
Try it Yourself »

Definition and Usage

The ISNULL() function tests whether an expression is NULL.

If expression is a NULL value, the ISNULL() function returns 1. Otherwise, it returns 0. 

Syntax

ISNULL(expression)

Parameter Values

Parameter Description
expression Required. The value to test

Technical Details

Works in: MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

More Examples

Example

Test whether an expression is NULL:

SELECT ISNULL("");
Try it Yourself »

Example

Test whether an expression is NULL:

SELECT ISNULL(350);
Try it Yourself »

Example

Test whether an expression is NULL:

SELECT ISNULL("Hello world!");
Try it Yourself »

❮ MySQL Functions