how to find the second highest salary from emp table?
Answer Posted / esakki
select max(salary) from employee where salary not in (select
top 1 salary from employee order by salary desc )
change 1 to 2,3,4,......like that for 3rd max ,4th max
salary.....
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what are the authentication modes in sql server? How can it be changed? : Sql dba
What is the limitation on the block size of pl/sql?
What is difference between primary and secondary key?
What is on delete restrict?
What are aggregate and scalar functions?
What is a dirty read sql?
What is the difference between python and sql?
Can you sum a count in sql?
How many types of indexes are there in sql?
what are ddl statements in mysql? : Sql dba
What is the main reason behind using an index?
what is self-join? : Sql dba
How do temporal tables work?
Write a unique difference between a function and a stored procedure.
how mysql optimizes distinct? : Sql dba