write the query for find the top 2 highest salary in sql
server
Answer Posted / srinivas
select e1.sal from emp e1 where 2=(select count(distnct
(e2.sal) from emp e2 where e2.sal>=e1.sal)
Is This Answer Correct ? | 33 Yes | 32 No |
Post New Answer View All Answers
Tell me about pre-defined functions of sql?
Explain the difference between delete,drop and truncate in SQL Server?
How to change the password of a login name in ms sql server?
Differentiate sql server reporting services vs. Crystal reports?
What is 1nf normalization form?
How do I start and stop sql server?
How to rename an existing column with sql server management studio?
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?
You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?
what is a schema in sql server 2005? : Sql server database administration
What is trigger explain with program?
How do you improve the performance of a SQL Azure Database?
What is the difference between writing data to mirrored drives versus raid5 drives
How to read data in a table with "select" statements?
Which is better statement or preparedstatement?