Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / tejasvita dhuri

select id,salary from (select id,salary,ROW_NUMBER()over (order by salary desc) as rowcol from emp)A
where A.rowcol=2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is synonyms?

573


Can we rollback delete command?

516


Do foreign keys improve performance?

551


How do I start pl sql?

494


How do I run a query in pl sql developer?

563






What is Collation Sensitivity ? What are the various type ?

501


what are the limitations of identity column? : Transact sql

608


What is integrity in sql?

562


What is percent sign in sql?

725


What is a function in oracle pl sql?

549


Why is theta join required?

671


Why commit is not used in triggers?

587


Can we enter data in a table in design view?

522


How do you truncate?

507


What is materialized view. What are different methods of refresh?

788