GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Database  >  SQL

 Print  |  
Question:  Find second lowest salary from emp table

Answer: display the second lowest salary from emp table without using min & all


June 06, 2008 16:32:21 #7
 anantdeshmukh001   Member Since: May 2008    Total Comments: 1 

RE: Find second lowest salary from emp table
 

select min(sal) from emp where emp.empcode in(select top 2 empcode from emp order by sal desc)

Go with this query (use inMS SQL server database)
Let me know, it is right or wrong.

     

 

Back To Question