how to find the second highest salary from emp table?

Answer Posted / krishna kishore

select top 1 salary from emp where salary in
(select top 2 salary from emp order by salary desc)
order by salary

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is numeric function sql?

546


What is the most common sql injection tool?

549


What is the difference between delete and truncate commands?

517


How do you update a table in sql?

522


Is left join and outer join same?

552






What is the most restrictive isolation level? : Transact sql

563


What is before trigger?

558


what are the advantages of sql ? : Sql dba

552


Enlist the advantages of sql.

574


What are some predefined exceptions in pl/sql?

555


Explain what is an index?

598


What is form and report?

521


How does a trigger work?

543


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

639


Is clustered index a primary key?

537