how to get duplicate records from tables?write qurey for this?

Answer Posted / anshuman

Select column_name1,column_name2
from table_T
group by column_name1 having count(*)>1

it will give all the duplicates value of column_name1

Is This Answer Correct ?    28 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does cobol compile db2 program?

810


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

953


How to restart a DB2 program?

1583


What is the difference between dbm cfg and db cfg file in db2 ?

1254


What is null in db2?

757


Are views updateable?

834


Explain in brief how does db2 determine what lock-size to use?

778


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

11376


What is db2 look?

784


Is ibm db2 open source?

811


What is universal database?

829


What is the usage of open cursor command?

781


How do I add a column to a table in db2?

838


What is role in db2?

783


Can you tell me how can you find out the # of rows updated after an update statement?

855