Course
Simulator
More
Premium
Log in
Function Reference
MySQL
PostgreSQL
Functions
NULLIF
NULLIF
Returns NULL if the values passed by the 1st or 2nd argument match, otherwise returns the value passed by the first argument.
MySQL 8.1
NULLIF
(
value_1
,
value_2
)
Examples
MySQL 8.1
SELECT
NULLIF
(
"SQL Academy"
,
"SQL Academy"
)
;