Query:
How to get the second highest from a Table
How to get the second highest from your table like second highest salary or second highest number.
How to get the second highest from your table like second highest salary or second highest number.
Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · SQLSupabase in Practice: Build and Ship Production Apps on Postgres, from First Table to LaunchDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Dileep Kumar PatelPosted Oct 21, 2013, 10:17 AM EDT
Its my pleasure.
Ibrahim RashidPosted May 31, 2012, 8:21 AM EDT
hi bro. This query return max value means 1st one value in resultset. To return 2nd value use min(salary) instead of max(salary). thanks for post.
Mahesh ChandTOP 10Posted May 18, 2012, 4:51 AM EDT
You probably need to discuss this in more details. What your table design is and what the field types etc.