How to select the duplicate rows from a table?
Answers were Sorted based on User's Feedback
Answer / channabasappa
select field name from tablename where group by field name
having count(field name)>1;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
Answer / pandu
select distinct from <field name> from <table name>
| Is This Answer Correct ? | 0 Yes | 3 No |
What is a thread?
How do you define a correlated name?
In which column of which DB2 catalog would you find the length of the rows for all tables?
Differentiate between cs and rr isolation levels? Where do you specify them?
How to resolve -805 error in DB2?
Define db2.
What do the initials DDL and DML stand for and what is their meaning?
What is Skeleton cursor table (SKCT)?
EXPLAIN has output with MATCHCOLS = 0. What does it mean?
Suppose we are doing transaction in a table and abend happened in between. Suppose i have completed the transaction upto X rows and I want to start the transaction again where the abend happened. I don't want to do the transaction from the first record. Then what i have to do.
How to take backup of table in db2?
What is deadlock?