totn MariaDB Functions

MariaDB: ISNULL Function

This MariaDB tutorial explains how to use the MariaDB ISNULL function with syntax and examples.

Description

The MariaDB ISNULL function tests whether an expression is NULL.

Syntax

The syntax for the ISNULL function in MariaDB is:

ISNULL( expression )

Parameters or Arguments

expression
The value to test if NULL.

Note

  • If expression is a NULL value, the ISNULL function will return 1.
  • If expression is not a NULL value, the ISNULL function will return 0.

Applies To

The ISNULL function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB ISNULL function examples and explore how to use the ISNULL function in MariaDB.

For example:

SELECT ISNULL('TechOnTheNet.com');
Result: 0

SELECT ISNULL('T');
Result: 0

SELECT ISNULL('');
Result: 0

SELECT ISNULL(52);
Result: 0

SELECT ISNULL(NULL);
Result: 1