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
How to create new tables with "select ... Into" statements in ms sql server?
How do I find the port number for sql server?
when would you go for denormalization? : Sql server database administration
Which is faster statement or preparedstatement?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
When would you use sql joins?
What are the basic functions for master, msdb, model, tempdb and resource databases?
Why we need to use secondry database file? though, we can do same work using primary database file also.
What is identity?
Explain the difference between function and stored procedure?
How can you check the level of fragmentation on a table?
Explain where clause?
What is the difference between value type and reference type?
Does sql server 2000 full-text search support clustering?
What are the advantages dts has over bcp?