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

Answer Posted / anita prasad

SELECT MIN(SAL) FROM (SELECT DISTINCT * FROM EMP ORDER BY DESC) WHERE ROWNUM<3;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain advantages of myisam over innodb? : Sql dba

609


How much does sqlite cost?

562


Can we create clustered index without primary key?

525


What is the difference between alter trigger and drop trigger statements?

604


How do you write an index?

529






What does trigger mean in slang?

531


Advantages and disadvantages of stored procedure?

583


what is the use of friend function? : Sql dba

543


Why sql query is slow?

583


What is rtm in testing?

580


How do you write a subquery?

527


How does index help in query performance?

569


What are the indexing methods?

582


What is a sql profiler?

592


Where is pl sql used?

521