Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



1. How to fetch all the duplicate records from the table. 2. How to fetch the second highest sala..

Answer / jyoti

even i m suffering from this Q. plz let me knw?

Is This Answer Correct ?    1 Yes 5 No

1. How to fetch all the duplicate records from the table. 2. How to fetch the second highest sala..

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

Post New Answer

More SQL Server Interview Questions

DIFFERENCE BETWEEN SQL SERVER 2005 and 2008

2 Answers   ADP,


What is set nocount on and what is set nocount off?

0 Answers  


What is the use of MOVE keyword in restore command

3 Answers   IBM,


What does it mean if @@cursor_row returns a negative number?

0 Answers  


What is cursor in ms sql server?

0 Answers  


What is resource db in sql server?

0 Answers  


you have couple of stored procedures that depend on a table you dropped the table and recreated it what do you have to do to reestablish those stored procedure dependencies?

0 Answers  


How to use subqueries in the from clause in ms sql server?

0 Answers  


What is the basic functions for master, msdb, tempdb databases?

2 Answers   CSC,


What type of locking occurs during the snapshot generation? : sql server replication

0 Answers  


what is the system function to get current user's user id? : Sql server database administration

0 Answers  


How to replace null values in expressions using isnull()?

0 Answers  


Categories