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

i want to maintain uniqueness on pdf without make lf??????????

1631


Before you give the explain statement, what are the prerogatives?

579


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

642


Explain the contents that are a part of dclgen.

655


What is meant by dclgen?

618






What do you mean by commit and rollback?

592


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 .....

1897


What is nvl in db2?

624


How do you pull up a query which was previously saved in qmf?

670


What is dbrm library?

578


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

590


What is data manager?

605


While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?

1818


How do you eliminate duplicate values in db2?

681


Mention a credible reason why select* is never given preference in an sql program that has been embedded.

712