bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL ISNULL() Function

Concept visual

MySQL ISNULL() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Test whether an expression is NULL:

SELECT ISNULL(NULL);

Definition and Usage

The ISNULL() function returns 1 or 0 depending on whether an expression is NULL. If expression is NULL, this function returns 1. Otherwise, it returns 0.

Syntax

Isnull(

expression )

Parameter Values

Parameter

Description expression

Required. The value to test

Technical Details

Works in:

From MySQL 4.0

More Examples

Example

Test whether an expression is NULL:

SELECT ISNULL("");

Example

Test whether an expression is NULL:

SELECT ISNULL(350);

Example

Test whether an expression is NULL:

SELECT ISNULL("Hello world!");

Previous

❮ MySQL Functions

Next

Previous

MySQL IFNULL() Function

Next

MySQL LAST_INSERT_ID() Function