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

Answer Posted / priya

select rownum,empno,sal from (select
rownum,empno,sal from emp order by sal desc) group
by rownum,empno,sal having rownum=2;


This will clearly work.............

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many sql are there?

522


how to present a past time in hours, minutes and seconds? : Sql dba

570


What is a table partition?

602


What is the usage of sql functions?

550


What is sql and db2?

538






Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

598


Why do we need pl sql?

550


Does sql*plus also have a pl/sql engine?

563


Does sql view stored data?

538


What is schema in sql?

518


What is dynamic query?

544


What is consistency?

717


How many types of primary keys are there?

533


How does pl sql work?

530


How do I install sql?

524