how to find the second highest salary from emp table?
Answer Posted / chirag shah
select DISTINCT(salary) from emp order by salary desc limit 1,1
this limit gives you 2nd record
if you want 3rd value then write limit 3,1
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can I learn sql in a week?
Which is faster joins or subqueries?
What is 19 null in sql?
What is the difference between the conventional and direct path loader? : aql loader
Where not exists in sql?
Which are the different types of indexes in sql?
What is anonymous block in sql?
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
What is write ahead logging in sql server?
What is the mutating table and constraining table?
Why stored procedure is better than query?
What is a relationship and what are they?
What is nosql vs sql?
Enlist the characteristics of pl/sql?
What is the process of copying data from table a to table b?