write query for fourth maximum salary from employee table

Answer Posted / ajay roy

The Correct answer is ---

select salary from employee aa
where 4=(select count(*)from employee bb
where aa.salary<=bb.salary)

Thanks Elumalai.k

Top Keyword returns the top(first) row not the max record

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is default constraint?

537


What are three major types of constraints?

514


Explain triggers?

557


What is exporting and importing utility?

603


What is the difference between having clause and where clause in sql server?

566






Write an sql query for deleting duplicate rows?

549


What is optimization and its types?

534


how to use DTS package in 2000,2005,2008 in sql server

1451


How do I view a stored procedure in sql server query?

533


Explain indexed views?

555


what stored procedure would you use to view lock information? : Sql server administration

578


What is the use of stored procedure?

511


How to find tables without indexes?

626


What is the difference between system objects and user objects?

702


Do you know how to store and query spatial data?

601