The NULLIF() function returns NULL if equals ; otherwise, it returns : NULLIF « Function « SQL / MySQL






The NULLIF() function returns NULL if equals ; otherwise, it returns

   
.
mysql>
The syntax for the NULLIF() function is as follows:
NULLIF(<expression1>, <expression2>)
mysql>
mysql>
mysql> SELECT NULLIF(10*20, 20*10);
+----------------------+
| NULLIF(10*20, 20*10) |
+----------------------+
|                 NULL |
+----------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
  








Related examples in the same category