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 varchar and nvarchar datatype?

3 Answers   Satyam,


What is trigger ?

7 Answers   Cap Gemini, SQL,


What is query and its types?

0 Answers  


I have cleared sbi clerk examination. I am Bachelor in computer application (BCA) graduate. so which type of question related bca in sbi clerk interviews. pls answers me at sejalvaghela@yahoo.co.in.. and also tell me which type of question asked in sbi clerk interview.

1 Answers  


What is subquery explain with example?

0 Answers  


two tables with table name ship(name,year) and battle (name,year),how to find the latest added year in the table ship

1 Answers  


Explain about merge replications?

0 Answers  


WHAT IS THE DIFFERENCE BETWEEN CANDIDATE KEY ,COMPOSITE KEY AND PRIMARY KEY. THAN U.

1 Answers   Synergy,


What are the Pre Requisites when you apply Srvice Packs?

1 Answers   IBM,


Different types of keys in SQL?

0 Answers   Infosys,


What are the advantages to use stored procedures?

0 Answers   Ernst Young,


How to delete duplicate records from a table?(for suppose in a table we have 1000 Records in that we have 200 duplicate Records , so ,how to findout that duplicate Records , how to delete those Records and arranged into sequence order? one more thing that there is no primary key at all)

5 Answers   Infosys, McAfee,


Categories