min plsql

Solutions on MaxInterview for min plsql by the best coders in the world

showing results for - "min plsql"
Lynnette
23 Feb 2020
1--in query use MIN 
2SELECT MIN(something)
3FROM some_table;
4
5--in statements use LEAST  (watch out, if there is a null it will return null)
6local_variable := LEAST('2', '5', '12', '3');
7
8--Here some examples
9LEAST('2', '5', '12', '3')
10Result: '12'
11
12LEAST(2, 5, 12, 3)
13Result: 2
14
15LEAST('apples', 'applis', 'applas')
16Result: 'applas'
17
18LEAST('apples', 'applis', 'applas', null)
19Result: NULL