select the 3rd maximum salary from sql server database if 4
(just an example In practically I may not know the exact
situation) of the highest salaries are equal.
Answer Posted / vijay saxena
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP 3 salary
FROM tblSalary
ORDER BY salary DESC)
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What are different types of table joins?
What are different types of database indexes?
How to declare and use cursor variables?
What are the disadvantages of using the stored procedures?
What are basics of policy management?
What is normalization? Explain its different types?
How to find out what is the default collation in a database?
Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.
what are user defined datatypes and when you should go for them? : Sql server database administration
What is a livelock?
What is the security principal at the database level that represents your session?
Find nth lowest salary or get nth lowest salary?
How to create a view with data from multiple tables?
What is tablesample?
what are the types of indexes? : Sql server database administration