Suppose there are many duplicate records in a Db2 table.
What is the query to retrive only duplicate records?
Answer Posted / sanj
say col1 is having duplicates in table tabA.Then,
select col1 from tabA
group by col1 having (count(col1) > 1)
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is the difference between bind and rebind in db2?
What is the physical storage length of date data type?
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
How do I import a csv file into db2?
How to take backup of table in db2?
What is copy pending status in db2?
What is the difference between cursor stability and repeatable read isolation levels?
What does db2 blu stand for?
What are the rules for db2 programming?
How to resolve deadlock issue
Are view updateable?
What is the role of the data page in the db2 database?
Explain about dbrm.
How to restart a DB2 program?