LEAST
Syntax
LEAST(value1,value2,...)Description
With two or more arguments, returns the smallest (minimum-valued) argument. The arguments are compared using the following rules:
If the return value is used in an
INTEGERcontext or all arguments are integer-valued, they are compared as integers.If the return value is used in a
REALcontext or all arguments are real-valued, they are compared as reals.If any argument is a case-sensitive string, the arguments are compared as case-sensitive strings.
In all other cases, the arguments are compared as case-insensitive strings.
LEAST() returns NULL if any argument is NULL.
Examples
SELECT LEAST(2,0); +------------+ | LEAST(2,0) | +------------+ | 0 | +------------+This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?
.png?alt=media&token=7e7f4c73-9972-4e67-9a1a-74dc18591022&width=260&dpr=4&quality=100&sign=760f8d93&sv=2)
.png?alt=media&token=ee5a45b3-d05b-4bb5-97d0-0f25c5eeb110&width=260&dpr=4&quality=100&sign=12bc3702&sv=2)