NVL & NVL2 , COALESCE FUNCTION in ORACLE
Oracle NVL
Nvl function is commonly used by Oracle developers. Its purpose is to let you replace NULLs with another value or expression.
NVL(expression1, expression2)
If expression1 is not NULL, then expression1 is returned. If expression1 is NULL then expression2 is returned. In general, the return type will be that of the first expression.
Oracle NVL2
This is another Oracle-specific function, which lets you decide which value to return, based on whether a specified expression is null or not. it is similar to decode.
NVL2(expression1, expression2, expression3)
Expression1 is the one that will be evaluated. If it is not null, then expression2 is returned. If it is null then expression3 is returned. See the difference?
The first expression in NVL2 is never returned, it is only used to determine whether expression2 must be returned, or expression3.
#ORACLE #NVL #NVL2
Kindly Support My channel.
[ Ссылка ]
Ещё видео!