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

Answer Posted / c srirammulu

select * from emp a where &n=(select count(distinct (sal))
from emp f where a.sal<f.sal)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we call a function containing dml statements in a select query?

638


How do I restart sql?

637


What is clause in sql?

673


What are the benefits of pl sql?

622


Explain the working of primary key?

720






What is sql*loader?

668


What are expressions?

654


What are the sql aggregate functions?

714


What are sql ddl commands?

635


Is not equal in sql?

656


Is pl sql a programming language?

633


What language is oracle sql developer?

619


What is left inner join in sql?

611


What is not null in sql?

668


What is the difference between drop and truncate commands?

582