GREATEST() returns the greatest of the list of expressions.
SQL> Syntax: GREATEST(<expression1>,<expression2>. . . <expression>) SQL> SQL> SELECT 2 GREATEST('ALEX','WALTER','PHILLIP') names, 3 GREATEST(10,20,135) numbers 4 FROM dual; NAMES NUMBERS ------ ---------- WALTER 135 SQL> SQL> SQL>