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 to restart a DB2 program?

1902


What is the function of logging in the db2 database?

1121


My sql statement select avg(salary) from emp yields inaccurate results. Why?

1092


Is ibm db2 open source?

1075


What are the bind parameters ibm db2?

1053


What is database alias db2?

1125


What is the result of open cursor statement?

1083


What is db2 catalog database?

1041


Explain the contention situations caused by locks?

1070


What is nvl in db2?

1093


How do I create a view in db2?

1022


What is buffer pool and list some of them?

1028


What is db2 connect?

1067


How to check last update on table in db2?

1059


What is sqlca?

1073