How to select the duplicate rows from a table?

Answer Posted / mahesh vasudevan

Select <col-name> from table A1 and A2
where A1.Col = A2.Col.

This should be an inner join. Then you are finding the
intersection of the key values...if you want to find the
duplicates for all matching column of the rows code AND
condition for join with all those columns.....by the way
there are different easy ways to find it. but this is one of
the way.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between oracle and db2?

675


How to find the maximum value in a column in the db2 database?

685


What is sqlca’s maximum length?

790


What is db2 purescale?

644


Which is faster delete or truncate?

766






Mention the location where the output received from explain statement is stored.

712


What is database alias db2?

692


What is db2 plan table?

708


Mention the downsides of page level lock.

812


Is it possible to create an Instance in DB2 using DB2 Control Center ?

712


What are types of indexes?

675


What is the maximum number of columns in a db2 table?

828


How do you select a row using indexes in db2?

742


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

1812


What is the latest version of ibm db2?

826