1. How to fetch all the duplicate records from the table.
2. How to fetch the second highest salary from the table.
Answer Posted / ashwini
2. Second highest salary from the table
select top 1 salary from emp where salary NOT IN
(SELECT MAX(salary) FROM emp)order by salary desc
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what are the three command line utilities and what are their primary functions?
How to get a list all databases on the sql server?
what is a join and explain different types of joins? : Sql server database administration
Describe different Processing Modes offered by SSRS?
What does it mean to manipulate data?
What is the maximum rows in sql server table?
Does partitioning improve performance?
What are different replication agents and what's their purpose? : sql server replication
Define candidate key, alternate key, and composite key.
What is SQL Azure Federations?
Determine when an index is appropriate?
What is difference between after and before?
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
How many cores do I need for sql server 2016?
What is normalization and what are the advantages of it?