Mega Code Archive

 
Categories / MySQL / Function
 

IFNULL() takes two arguments If the first argument is not NULL, that argument is returned; otherwise, the fun

ction returns  its second argument: mysql> mysql> SELECT IFNULL(NULL,'a'), IFNULL(0,'b'); +------------------+---------------+ | IFNULL(NULL,'a') | IFNULL(0,'b') | +------------------+---------------+ | a                | 0             | +------------------+---------------+ 1 row in set (0.00 sec)