how to find the second highest salary from emp table?

Answer Posted / anil maurya

select top 1 rate from HumanResources.EmployeePayHistory
where rate<(select MAX(rate) as R from HumanResources.EmployeePayHistory)
order by rAte Desc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is clustered index a primary key?

537


what is the difference between truncate and drop statements? : Sql dba

558


How do I trace sql profiler?

496


How do you drop a trigger?

544


What are the methods of filing?

524






What is the usage of sql functions?

550


What is %rowtype in pl sql?

520


What is the difference between distinct and unique in sql?

476


Explain what is dbms?

583


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

552


what are the different tables present in mysql? : Sql dba

508


What are different methods to trace the pl/sql code?

546


What is keys and its types?

548


What is primary key and unique key?

549


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

600