I want to get the minimum of a list of numbers in MYSQL
select min(1,9,20,..);
is this possible?
The function you are looking for is called LEAST()
:
select least(2,4,6,8,1,2,3,4) as result;
+--------+
| result |
+--------+
| 1 |
+--------+
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With