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
How to create a view using data from another view?
Do you know what are acid properties?
Is sql server free?
How many types of objects are there?
What is difference in performance between insert top (n) into table and using top with insert?
What are system databases in ms sql server?
Explain what is the difference between a local and a global temporary table?
Define outer join in sql server joins?
how you can move data or databases between servers and databases in sql server? : Sql server administration
What is the rdl file?
How much space does sql server 2016 take?
Explain isolation levels that sql server supports?
What is the difference function and stored procedure?
What is the bookmark lookup and rid lookup?
When should you use an instead of trigger?