IFNULL function and IF function in MySQL

    The IFNULL function in MySQL is similar to the NVL function in Oracle. Its expression is: IFNULL(expr1, expr2), which means: if the first parameter is not empty, return the first parameter, otherwise return the second parameter .

       IF(expr1,expr2,expr3) is similar to the NVL2 function in Oracle, meaning: if the value of the first expression is TRUE (not 0 or null), return the value of the second parameter, otherwise return the third parameter the value of a parameter.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325938842&siteId=291194637