函式結構
greatest( expr1, expr2, ... expr_n )
expr1, expr2, . expr_n 可以值也可以是函式.
函式功能
取得值最大值。
影響版本: Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g
例子
greatest(2, 5, 12, 3) would return 12
greatest('2', '5', '12', '3') would return '5'
greatest('apples', 'oranges', 'bananas') would return 'oranges'
greatest('apples', 'applis', 'applas') would return 'applis'
數字按大小排 ,字元按首字元比較(如果相等則向下比較)