With two or more arguments, returns the smallest (minimum-valued) argument. The arguments are compared using the following rules:
SELECT LEAST(2,0);
0
SELECT LEAST(34.0,3.0,5.0,767.0);
3.0
SELECT LEAST('B','A','C');
'A'
If any argument is NULL, the result is NULL. No comparison is needed.
SELECT LEAST(2,0);
0
SELECT LEAST(34.0,3.0,5.0,767.0);
3.0
SELECT LEAST('B','A','C');
'A'