개인적인 정리

ORACLE COALESCE() 본문

DB/ORACLE

ORACLE COALESCE()

yeon.Biju 2020. 3. 25. 14:30

오라클 COALESCE()

 

COALESCE returns the first non-null expr in the expression list. You must specify at least two expressions. If all occurences of expr evaluate to null, then the function returns null.

 

 

SQL > SELECT COALESCE(NULL, 5,4,3,2,1, 0) FROM DUAL ;

   --> 5

 

SQL > SELECT COALESCE(NULL, 5,NULL,3,2,1, 0) FROM DUAL ;

   --> 5

 

SQL > SELECT COALESCE(NULL, NULL, 0) FROM DUAL ;

   --> 0

 

SQL > SELECT COALESCE(NULL, NULL, 0) FROM DUAL ;

   --> 

'DB > ORACLE' 카테고리의 다른 글

ORACLE COUNT()  (0) 2020.03.26
ORACLE COS()  (0) 2020.03.26
ORACLE CONCAT()  (0) 2020.03.25
ORACLE COLLECT()  (0) 2020.03.25
ORACLE CHR()  (0) 2020.03.25
ORACLE CEIL()  (0) 2020.03.24
ORACLE CAST()  (0) 2020.03.24
ORACLE AVG()  (0) 2020.03.24
Comments