tags:

views:

31

answers:

2

I want to get the minimum of a list of numbers in MYSQL

select min(1,9,20,..);

is this possible?

A: 

Yes it is possible

SELECT MIN( mark ) FROM `student`

given that you have a student table with a mark column in it.

or use Least as posted by @Ike Walker

VoodooChild
+2  A: 

The function you are looking for is called LEAST():

select least(2,4,6,8,1,2,3,4) as result;
+--------+
| result |
+--------+
|      1 |
+--------+
Ike Walker