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

Difference Between ORDER BY Clause and GROUP BY Clause in SQL?

810


How do you debug a procedure in sql server?

638


What is database architecture? : SQL Server Architecture

742


Can truncate be rolled back?

703


What do you know about normalization and de- normalization?

639






What is clustered primary key?

766


Mention the uses of stored procedures.

733


How to stop log file growing too big?

749


What part does database design plays a role in performance of an sql server-based application?

720


what are user defined datatypes and when you should go for them? : Sql server database administration

753


How to list all login names on the ms sql server?

703


Explain the properties of a relational table?

758


Do you know exporting and importing utility?

696


What are rows and columns?

719


What are extended events in sql server?

670