Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

LEAST

Example

Provide the minimum value from the list of arguments.

SELECT LEAST(3, 12, 34, 8, 25); 

Definition and Usage

The LEAST() function yields the smallest value from the list of arguments.

Note: Also consider the GREATEST() function.

Syntax

LEAST(arg1, arg2, arg3, …)

Parameter Values

Parameter

Description

arg1arg2arg3, …

Necessary: Specify the list of arguments for assessment.

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Provide the minimum value from the given list of arguments.

SELECT LEAST(“w3Schools.com”, “microsoft.com”, “apple.com”);