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 / sarat
TO FIND THE Nth HIGHEST SAL IN EMP TABLE
SELECT MIN (salary) as NthSalary FROM emptable WHERE
salary IN ( SELECT DISCINCT TOP N salary FROM emptable
ORDER BY salary DESC )
Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What are parameterized reports?
What is SQL Azure?
How to create hyperlink from returned sql query ?
What are subquery and its properties?
What is the report model project?
How to get a list of columns in a view using "sys.columns" in ms sql server?
System requirements for sql server 2005 express edition?
What is table constraint?
What are the default system databases in sql server 2000?
How to delete database objects with "drop" statements in ms sql server?
Do you know clustered and non-clustered index?
How to use column default values in insert statements in ms sql server?
What is 3nf normalization?
What is an expensive query?
What to perform pattern match with the like operator?