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


Please Help Members By Posting Answers For Below Questions

What is the usage of open cursor command?

599


What are the rules for db2 programming?

641


Mention the definition of cobol in varchar field.

689


Explain the benefits you can get from mainframe connect?

520


Explain about rct in db2?

635






Define db2 and its databases?

618


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

639


What is deadlock in db2?

579


Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.

2322


How do I delete a table in db2?

645


Is it possible using max on a char column?

604


When the like statement is used?

636


What is the physical storage length of date data type?

725


Mention the downsides of page level lock.

707


What is bufferpool in db2?

577