1. How to fetch all the duplicate records from the table.
2. How to fetch the second highest salary from the table.
Answers were Sorted based on User's Feedback
Answer / devraj
(1) Query to fetch all duplicate records:
Select * From emp02 Where Rowid Not In (Select Min(Rowid)
From emp02 Group By No, ename, Work)
(2) Query to fetch 2'nd highest salary:
Select * From (Select a.*, dense_rank () Over (Order By sal
Desc) Vb From emp02 a) Where Vb = 2;
Is This Answer Correct ? | 7 Yes | 12 No |
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
What is the standby server?
What is sorting and what is the difference between sorting and clustered indexes?
How to list all tables having unique constraints in any of the columns in a database.
What does indexation mean?
what are the different types of replication you can set up in sql server? : Sql server database administration
Can binary strings be used in arithmetical operations?
How real and float literal values are rounded?
What are the different sql server versions?
CTE(common table expression)
What is use of attribute hierarchy ordered ? : sql server analysis services, ssas
What is importing utility?