Fetching top 5 records of maximum salary

SELECT id, usrname, salary
FROM yourtable
ORDER BY salary DESC
LIMIT 5
 
 
or 
 
 
 
SELECT * FROM mytable ORDER BY salary DESC LIMIT 5 

No comments:

Post a Comment