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

Answer Posted / raji_4u

select *
from emp e1
where 2 = ( select count(distinct sal)
from emp e2
where e1.sal <= e2.sal
)

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is difference between delete and truncate commands? : Sql dba

580


How is indexing done in search engines?

531


what is collation? : Sql dba

616


What is %rowtype in pl sql?

513


Does sql use python?

564






is it possible to pass an object or table to a procedure as an argument?

576


What is the purpose of the partition table?

546


Explain what is sql?

610


what are null values? : Sql dba

546


Is delete faster than truncate?

550


How many rows can sqlite handle?

587


How to run sql*plus commands in sql developer?

592


what is the difference between primary key and unique key? : Sql dba

531


What is an inner join sql?

549


What mean sql?

583