find the 3rd max salary

Answer Posted / kk

select top 1 * from (
SELECT DISTINCT TOP 3 salary
FROM tblemp
ORDER BY salary desc) t order by salary asc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the stored procedure?

645


Explain system scalar functions?

593


What is dbcc? Give few examples.

586


Why we need sql server?

569


How to write a query with a right outer join in ms sql server?

490






What is data block and how to define data block size?

613


How to test values returned by a subquery with the in operator?

683


List out a number of the wants to setup a SQL Server failover cluster?

587


What is meant by dirty read?

564


How to get all stored procedures in sql server?

514


Can coalesce return null?

559


How to drop an existing stored procedure in ms sql server?

553


what is isolation level at dead lock?

1757


What purpose does the model database server?

668


Tell me what are the essential components of sql server service broker?

518