how to find nth highest salary
Answer Posted / ramakrishna
select e1.* from emp e1 where n=(select
count(distinct(e2.sal)) from emp e2 where e1.sal<=e2.sal);
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is sql server schema compare? How we can compare two database schemas?
what's the information that can be stored inside a bit column? : Sql server database administration
Is mysql the same as sql server?
What’s the use of custom fields in report?
Write a query for primary key constraint with identity key word?
What is the index requirement in SQL Azure?
What is advantage data architect?
What are sp_configure commands and set commands?
How to create “dependant” parameter “make, model, year”
Which tcl commands are available on the sql server?
What is a result set object returned by odbc_exec()?
What extended events?
What are the main differences between #temp tables and @table variables and which one is preferred?
Explain multiserver query
How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?