IS NULL in MySQL

MySQL IS NULL
To filter the results, the MySQL IS NULL condition is used with SELECT, INSERT, UPDATE, and DELETE statements to check for a NULL value.

Syntax:

WHERE expression IS NULL;

Parameters:

expression: It is used to specify a column or a field to be tested.

Example: Students table:

ID NAME AGE
1 Joy 5
2 Smiley 13
3 Happy 11
4 Tom 15
5 Jerry 10
6 Bruno NULL
7 David NULL

 

Query:

SELECT name
FROM students
WHERE age IS NULL;

Output:

NAME
Bruno
David
2 rows  in set <0.00 sec>