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