How to find the max value of a field in MySQL table with SQL

2 Answers

0 votes
SELECT salary FROM salaries order by salary DESC limit 1 

-- salary
-- ------
-- 10000
-- 12000
-- 13000
-- 13000
-- 10000
-- 11000

-- result:

-- salary 	
-- ------
-- 13000

 



answered Sep 11, 2016 by avibootz
0 votes
SELECT Max(salary) FROM salaries

-- salary
-- ------
-- 10000
-- 12000
-- 13000
-- 13000
-- 10000
-- 11000

-- result:

-- salary 	
-- ------
-- 13000


 



answered Sep 11, 2016 by avibootz

Related questions

1 answer 362 views
1 answer 283 views
1 answer 359 views
1 answer 400 views
1 answer 327 views
1 answer 349 views
...