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
Does order by actually change the order of the data in the tables or does it just change the output?
What are xml indexes?
What is the use of stored procedure?
Do you know what are different types of replication in sql server?
what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration
What is normalization of database? What are its benefits?
How to replace the Query Result 'Null Value' with a text ?
What is a covering index?
What is set nocount on?
What is the difference between createstatement and preparedstatement?
How do I find the transaction log size in sql server?
What is a collation?
How you can add messages to the nt event log from within a stored procedure?
Does the order of columns in update statements matter?
What is 2nf example?