how to find nth highest salary

Answer Posted / satesh naidu

select * from emp e1 where &n=(select count(distinct
(e2.sal) from emp e2 where e.sal>e1.sal)

Hai friends try this.u will get nth highest salary.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.

621


Does dbcc checkdb requires db to be in single_user mode? : sql server database administration

522


How many partitions a clustered index has by default in sql server 2012?

667


tell me the disaster recovery plan

2028


Explain for xml explicit mode?

570






Describe and explain about SQL native client?

622


How can you manage sql azure security?

85


How to rename an existing column with the "sp_rename" stored procedure in ms sql server?

556


What are types of scd? : sql server analysis services, ssas

540


What happens if you insert a duplicate key for the primary key column in ms sql server?

535


What is tablesample?

578


What is cursors? And what are the different types of cursor?

557


Differentiate between mongodb vs. Sql server?

584


Do you know what is blocking?

543


How do you implement session management in SQL Server mode?

562