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
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
What is a functions and types in sql server?
How to insert and update data into a table with "insert" and "update" statements?
What is global temp table?
What do you understand by the denormalisation?
What are the new features in SQL Server 2005 when compared to SQL Server 2000?
on line cluster can we make if yes tell me the procedure
What is the Control Flow in SSIS
What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
Can you explain what is the use of custom fields in report?
What are the differences between lost updates and uncommitted dependencies?
What is schemabinding a view?
How to use clusters?
What is a self join in sql server?
Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.