sudh
sudh

Reputation: 1105

find max value without aggregate operator in mysql

how to find the maximum value in a column with integer values without using aggregate operator in mysql

Upvotes: 1

Views: 842

Answers (2)

Scott Stafford
Scott Stafford

Reputation: 44786

You can do:

SELECT IntColumn FROM MyTable ORDER BY IntColumn DESC LIMIT 1

Upvotes: 0

Adriaan Stander
Adriaan Stander

Reputation: 166406

How about something like

SELECT <Value>
FROM <YourTable>
ORDER BY <Value> DESC
LIMIT 1

Upvotes: 4

Related Questions