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 368 views
1 answer 285 views
1 answer 366 views
1 answer 404 views
1 answer 329 views
1 answer 354 views
...