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


May 05, 2008 03:19:54 #3
 ashjain78   Member Since: May 2008    Total Comments: 1 

RE: Find second lowest salary from emp table
 
SELECT a.Emp_Name,a.Emp_sal FROM employee a where 2=(SELECT count(distinct(b.Emp_sal)) FROM employee b WHERE a.Emp_sal<=b.Emp_sal)
     

 

Back To Question