write query for fourth maximum salary from employee table

Answer Posted / avanish kumar

if you have a table emp and you have to find fourth maximum
salary from emp table then you will have to write this
query.....

select top 1 sal from (select top 4 * from emp order by sal
desc) as sal order by sal

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to use linked server?

560


Explain “not null constraint” in sql server?

522


How to insert and update data into a table with "insert" and "update" statements?

506


What is the latest version of microsoft sql server?

479


what is blocking? : Sql server database administration

498






What is attribute relationships, why we need it? : sql server analysis services, ssas

498


How to drop existing indexes in ms sql server?

585


What is the use of set nocount on/off statement?

626


Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

541


How to execute the cursor queries with "open" statements?

611


If the job running very slow what is the action you do

1425


When a primary key constraint is included in a table, what other constraints does this imply?

595


How do users use Report Builder with SQL Server data sources?

119


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

749


Explain few examples of RDBMS?

609