본문 바로가기

컴퓨터/Oracle

oracle nvl 함수



1. NVL함수 

    NVL(value,1)  

     -> value가 null 일경우 1을 반환

                     그렇지 않을경우 value값을 반환

2. NVL2 함수  

NVL2(expr1, expr2, expr3) 함수는

   expr1이 null이 아니면 expr2를 반환하고,

   expr1이 null이면 expr3을 반환한다.

ex) select nvl2('','Corea','Korea') from dual;