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
What is the difference between dbm cfg and db cfg file in db2 ?
What does db2 blu stand for?
How do I add a column to an existing table in db2?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
How to connect to db2 database from windows command line?
Explain about rct.
Explain package in db2 and its advantages?
What is ibm db2 database?
How do I delete a column in db2?
What is buffer pool and list some of them?
What is load replace in db2?
If I have a view which is a join of two or more tables, can this view be updateable?
Define sqlca.
How many databases can be created inside an instance in db2 ?
Is schema the same as database?