how to get second highest salary in SQL(as/4000

Answer Posted / selvaraj v , anna univ coe

SELECT * FROM Employee e
WHERE 2=(SELECT COUNT(DISTINCT Salary) FROM Employee x
WHERE x.Salary >= e.Salary);

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain advantages of innodb over myisam. : Sql dba

739


How can one get sql*loader to commit only at the end of the load file? : aql loader

653


How do I turn a list into a table?

599


Can we delete column in sql?

663


How to take user input in pl sql?

811






What is package in pl sql?

665


What is the use of primary key?

633


How to set up sql*plus output format in oracle?

692


Explain ddl statements in pl/sql?

650


What is difference between stored function and application function?

674


Can cursors be part of a trigger body?

1227


what is user defined functions? : Sql dba

641


What is memory optimized?

655


Explain spool.

782


What is sql*loader and what is it used for? : aql loader

704