how to find the second salary?

Answer Posted / moorthy t

select n,* from(select rownum n,* from (select * from table
where group by (sal) order by (sal) desc)) where n=2;

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any difference between the primary key and unique key?

574


Can you explain the disadvantages/limitation of the cursor?

507


what are the three command line utilities and what are their primary functions?

101


What is scalar user-defined function?

554


What is merge?

573






Will the writetext statement activate a trigger?

571


What are clustered and non-clustered index?

550


Do you know query execution plan?

588


What does executeupdate return?

541


How can we solve concurrency problems?

572


Can I delete event logs?

546


How can you check the version of sql server?

561


Define ACID properties in a Database?

630


What are sub reports and how to create them?

99


How to use "if ... Else if ... Else ..." Statement structures in ms sql server?

539