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 / your name
Forget everything...Here it goes..in a simple way...
Select salary from tbl_name a where
n = (Select count(distinct(count(*))) from tbl_name b
where b.salary>=a.salary)
Substitute you value for n. thats all.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
what are the different types of replication you can set up in sql server? : Sql server database administration
Tell me what is difference between view and materialized view?
What are relationships and mention different types of relationships in the dbms
How to restore performance issues and how to check?
Explain datetimeoffset data type in sal server 2008?
How will you find out if there are expensive SQL statements running or not?
Do you know concepts and capabilities of sql server?
What are the types of resultset?
What are the tool windows in sql server management studio? : sql server management studio
Do you think BCNF is better than 2NF & 3NF? Why?
How to loop through returning rows?
Can two tables share a primary key?
Explain a join?
what is a traditional network library for sql servers? : Sql server database administration
What is difference between commit and rollback when used in transactions?