I recently had the need to retrieve the second highest value in a column. Here are the steps I used:
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
select max(SALARY) from EMPLOYEE where SALARY < (select max(SALARY) from EMPLOYEE) Note -- If you want the entire record, try this: select * from EMPLOYEE where SALARY = ( select max(SALARY) from EMPLOYEE where SALARY < (select max(SALARY) from EMPLOYEE)
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.