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
How can we retrieve the total number of records in RPG & CLLE?
Which components manage deadlocks in db2?
How will you return the number of records in table?
is it compulsory commitment control in journal?
What is cloudant database?
What are catalog tables in db2?
What is ibm db2 client?
What is syscat in db2?
How can you quickly find out the # of rows updated after an update statement?
What is package in cobol db2?
How to compare data between two tables in db2?
What is the difference between bind and rebind in db2?
What is data manager?
What does a deadlock mean in DB2?
What is db2 look?