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
Which are the different types of indexes in sql?
How to rename a table?
Can we create table in function?
what is self-join? : Sql dba
Sql technical questions
What are the rules to be applied to nulls whilst doing comparisons?
What is the importance of sqlcode and sqlerrm?
Can we use distinct and group by together?
what is the difference between undefined value and null value? : Sql dba
What does the hierarchical profiler does?
Explain about various levels of constraint.
What is set serveroutput on?
who introduced sql?
what is an index? : Sql dba
Explain cursor types?