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 to find the maximum value in a column in the db2 database?

687


What is release/acquire in bind?

733


How can you count the number of rows from a table tab?

722


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

1898


Differentiate between cs and rr isolation levels? Where do you specify them?

671






Which component is used to execute the sql statements?

724


Are views updateable?

732


What is check constraint in db2?

706


Is it possible using max on a char column?

703


How to get the ddl of a table in db2?

759


What is db2 stogroup?

780


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

756


How to create backup table in db2?

741


What is the physical storage length of date data type?

857


What does a deadlock mean in DB2?

742