This function is used to return the smallest value in a list of values.
least(T v1, T v2, ...)
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
v1 |
Yes |
DOUBLE, BIGINT, or DECIMAL |
The value can be a float or integer. |
v2 |
Yes |
DOUBLE, BIGINT, or DECIMAL |
The value can be a float or integer. |
The return value is of the DOUBLE type.
The value 1.0 is returned.
select least(1,2.0,3,4.0);
The value NULL is returned.
select least(null);