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 purpose of rollback and commit?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
Name the various locking levels available?
How would you find out the total number of rows in a db2 table?
Explain the function done by data manager?
What is the role of data manager in the db2 database?
What are the bind parameters ibm db2?
How do I delete a table in db2?
Mention the location where the output received from explain statement is stored.
What are the contents of dclgen?
What is lock escalation in db2?
Where do you specify them?
How can you quickly find out the # of rows updated after an update statement?
What are foreign keys in db2?
How to connect to db2 database from windows command line?