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...


Suppose there are many duplicate records in a Db2 table.
What is the query to retrive only duplicate records?

Answers were Sorted based on User's Feedback



Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / gouri

select column_1 from tablename groupby column1 having coun(*)>1

Is This Answer Correct ?    11 Yes 4 No

Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / chidambara subbu

SELECT City FROM Customers
Group by City
HAVING COUNT(City) > 1

Is This Answer Correct ?    3 Yes 0 No

Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / sanj

say col1 is having duplicates in table tabA.Then,

select col1 from tabA
group by col1 having (count(col1) > 1)

Is This Answer Correct ?    4 Yes 4 No

Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplica..

Answer / azharuddinsyed

SELECT <COLUMN_1> FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(COLUMN_1) > 1

OR

SELECT <COLUMN_1> FROM TABLENAME
GROUP BY COLUMN_1
HAVING COUNT(*) > 1

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

How will you delete duplicate records from a table?

7 Answers   Google,


What is scrollable cursor in db2?

0 Answers  


Can you access the DB2 Directory table using SQL?

3 Answers  


What is EXPLAIN?

1 Answers  


What is multi row fetch in db2?

0 Answers  


What is cursor stability?

1 Answers  


What is a composite index and how does it differ from a multiple index?

1 Answers  


Explain correlated sub-queries.

0 Answers  


What will the COMMIT accomplish?

5 Answers  


Which transaction use a command thread ?

1 Answers  


What is db2 look?

0 Answers  


the dd name for ksds is dest1 and what is the dd name for alternate index of ksds ? a.dest b.dest1 c.dest1a d.dd1

2 Answers   Logica CMG,


Categories