LEAST(value1,value2,...)
With two or more arguments, returns the smallest (minimum-valued) argument. The arguments are compared using the following rules:
LEAST() returns NULL if any argument is NULL.
SELECT LEAST(2,0); +------------+ | LEAST(2,0) | +------------+ | 0 | +------------+
SELECT LEAST(34.0,3.0,5.0,767.0); +---------------------------+ | LEAST(34.0,3.0,5.0,767.0) | +---------------------------+ | 3.0 | +---------------------------+
SELECT LEAST('B','A','C'); +--------------------+ | LEAST('B','A','C') | +--------------------+ | A | +--------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/least/