Page 1 of 1

How to find greatest number in a database table?

Posted: Fri Oct 14, 2005 2:36 pm
by ljCharlie
I need to find the greatest number in my MySQL database table. What is the SQL statement will accomplish this?

Thanks!

Posted: Fri Oct 14, 2005 2:46 pm
by ljCharlie
Never mind. I got it.

Posted: Sat Oct 15, 2005 4:58 am
by timvw
It's always nice if you let the others know what the solution was... :)

Code: Select all

SELECT MAX(columnname)
FROM tablename