日期:2014-05-17 浏览次数:20795 次
SQL> select * from test;
A B C
---------- ---------- ----------
10 20 5
30 10 10
55 10 15
10 55 20
30 10 25
20 30 30
6 rows selected.
SQL> select greatest(a,b,c),least(a,b,c) from test;
GREATEST(A,B,C) LEAST(A,B,C)
--------------- ------------
20 5
30 10
55 10
55 10
30 10
30 20
6 rows selected.