Last Updated: March 11, 2022

NULL is defined as no value in MySQL

If your record in the table has no value for a particular field you can insert NULL value for that

Insert NULL value for the salary field of the employee

INSERT INTO employee VALUES ("John Lee",42,null)

It is not possible to test for NULL values with comparison operators, such as =, <, or <>.

We will have to use the IS NULL and IS NOT NULL operators instead.

SELECT name FROM employees WHERE salary IS NOT NULL