A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/sql/mysql-isnull-function/ below:

MySQL ISNULL( ) Function - GeeksforGeeks

MySQL ISNULL( ) Function

Last Updated : 12 Jul, 2025

The MySQL ISNULL() function is used for checking whether an expression is NULL or not.

This function returns 1 if the expression passed is NULL; otherwise, it returns 0. The ISNULL() function in MySQL accepts the expression as a parameter and returns an integer with a value of a value 0 or 1 depending on the parameter passed.

Syntax

MySQL ISNULL() function syntax is:

ISNULL(expression)

Parameters:

Supported Versions of MySQL

The MySQL ISNULL function is supported on following versions:

MySQL ISNULL( ) Function Example

Let's look at some examples of the ISNULL() function in MySQL. Learning the ISNULL() function with examples will help in understanding the concept better.

Example 1

Implementing ISNULL() function.

SELECT ISNULL(NULL); 

Output:

1 
Example 2

Implementing ISNULL() function on a string.

SELECT ISNULL("gfg"); 

Output:

0 
Example 3

Implementing ISNULL() function on an integer value.

SELECT ISNULL(123); 

Output:

0 
Important Points About MySQL ISNULL() Function


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4