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
how to do partition in sqlserver
How to check table values in sql server?
How much does sql server 2016 cost?
What are sub reports and how to create them?
What is the cartesian product of the table?
Does index speed up select statements?
How real and float literal values are rounded?
Can sql servers link to other servers?
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
How do database indexes work?
What options are there to delete rows on the publisher and not on the subscriber? : sql server replication
Explain what is public role in sql server?
How can you tell if a database object is invalid?
While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?
How does the report manager work in SSRS?