PL/SQL Greatest

Oracle PL/SQL Greatest Function

The Greatest function returns the greatest value in a list of expressions.

The Greatest Function syntax:

greatest( exp1, exp2, … exp_n )

Example:

Select greatest(4, 7, 11, 9) From dual;
11

Select greatest('4', '7', '11', '9') From dual;
9

Select greatest('oracle', 'ibm', 'hp', 'dell') From dual;
oracle

Select greatest('test1', 'test2', 'test3') From dual;
test3