Write a query to find second highest salary of an employee.

Answer Posted / versaites

select top 1 emp_total_sal,emp_name from (
select top 2 emp_total_sal,emp_name from employee_table
ORDER BY emp_total_sal DESC) a
ORDER BY emp_total_sal ASC

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is indexes?

540


What are different types of tables in sql?

526


Is sql workbench free?

530


Can instead of triggers be used to fire once for each statement on a view?

537


How can you know that statistics should be updated?

601






how to get @@error and @@rowcount at the same time? : Sql dba

525


What are instead of triggers?

621


What is a crud api?

497


What is graph sql?

524


What is synonyms?

570


What does dml mean?

543


what is the difference between a having clause and a where clause? : Sql dba

517


what is collation? : Sql dba

612


What is pl sql variable?

502


Is the primary key an index?

595