網頁

2020/8/5

Oracle LEAST function

Oracle LEAST函式可取得多個輸入參數中的最小值。

SELECT LEAST(3, 5, 1) "LEAST" FROM DUAL;
+-------+
| LEAST |
+-------+
| 1     |
+-------+

SELECT LEAST('B', 'C', 'A') "LEAST" FROM DUAL;
+-------+
| LEAST |
+-------+
| A     |
+-------+

SELECT LEAST(1.2, 3.5, 7.9) "LEAST" FROM DUAL;
+-------+
| LEAST |
+-------+
| 1.2   |
+-------+

3 則留言: