how to find the second highest salary from emp table?

Answer Posted / mohamed hussain

select salary from
(select salary,Dense_RANK() over (Order by salary desc) as
Level from salary) TMP
where Level=@Level

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of exceptions.

638


What are sql commands?

505


What if we write return in procedure?

788


What is out parameter used for eventhough return statement can also be used in pl/sql?

588


Write a query to display the current date in sql?

522






what are the 'mysql' command line arguments? : Sql dba

654


What is the usage of nvl function?

601


What is interval partition?

546


Does execute immediate commit?

702


Explain autonomous transaction.

640


Which is better join or inner query?

522


What is execute immediate?

550


How does join work in sql?

556


what are the type of locks ? : Sql dba

532


What is the left table in sql?

520