NVL function, NVL2 function and NULLIF function in Oracle

1. The format of the NVL function is as follows:

       NVL(expr1, expr2) means: if the value of the first parameter in Oracle is empty, the value of the second parameter is displayed, and if the first parameter is not empty, the value of the first parameter is displayed.


2. The format of the NVL2 function is as follows:

NVL2(expr1,expr2,expr3), meaning: if the value of the first parameter in Oracle is empty, then display the value of the second parameter, if the value of the first parameter is not empty, then display the third parameter value of .


3. The format of the NULLIF function is as follows:

NULLIF(expr1,expr2), meaning: if the value of the first parameter is equal to the value of the second parameter, return null, otherwise return the first value.

Guess you like

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