How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database
plz mail the answer @ mak2786@gmail.com
Answer Posted / vinay singh
To find any number of Salary..
Select * From Table E1 Where
(n-1) = (Select Count(Distinct(E2.Sal)) From Table E2
Where E2.Sal> E1.Sal)
**Vinay Singh
| Is This Answer Correct ? | 8 Yes | 12 No |
Post New Answer View All Answers
What is the difference between ‘having’ clause and a ‘where’ clause?
What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?
What is primary key and example?
How to download and install microsoft sql server management studio express?
How do I make a resultset scrollable?
Where is my database stored on the hard disk in ms sql server?
What is stored procedures?
How do I find sql server instance name?
How do I partition a table in sql server?
How to compare the top two records using sql?
What type of locking occurs during the snapshot generation? : sql server replication
What is a DBMS, query, SQL?
Which is the latest version of sql server and when it is released?
How many types of local tables are there in sql server?
What do you understand by the denormalisation?