개인적인 정리

Oracle GREATEST() 본문

DB/ORACLE

Oracle GREATEST()

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

오라클 GREATEST()

 

GREATEST returns the greatest of a list of one more expressions. Oracle Database uses the first expr to determine the return type. If the first expr is numeric, then Oracle determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that data type before the comparsion, and returns that data type. If the first expr is not numeric, then each expr after the first is implicitly converted to the data type of the first expr before the comparision.

 

SQL > SELECT GREATEST('HARRY', 'HARRIOT', 'HAROLD') FROM DUAL ;

   --> HARRY

 

SQL> SELECT GREATEST(1, 2, 3) FROM DUAL ;

   --> 3

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

Oracle INSTR()  (0) 2020.04.06
Oracle INSERTCHILDXML()  (0) 2020.04.06
Oracle INITCAP()  (0) 2020.04.06
Oracle GROUP_ID()  (0) 2020.04.06
ORACLE FLOOR()  (0) 2020.03.30
ORACLE FIRST()  (0) 2020.03.30
ORACLE EXTRACT()  (0) 2020.03.30
ORACLE EXP()  (0) 2020.03.30
Comments