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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we retrieve the total number of records in RPG & CLLE?

577


Which components manage deadlocks in db2?

1016


How will you return the number of records in table?

880


is it compulsory commitment control in journal?

2415


What is cloudant database?

1032


What are catalog tables in db2?

980


What is ibm db2 client?

879


What is syscat in db2?

950


How can you quickly find out the # of rows updated after an update statement?

985


What is package in cobol db2?

1075


How to compare data between two tables in db2?

1031


What is the difference between bind and rebind in db2?

1392


What is data manager?

994


What does a deadlock mean in DB2?

1094


What is db2 look?

970