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 sqlcode -811?
7 Answers Accenture, CTS, TCS,
Explain about rct.
What is alias in db2?
How to rename a table in DB2 ?
What is the use of dclgen in db2?
what is static sql? what is dynamic sql? Give me details
What are db2 error codes -305 and -407. What is the difference between these 2 error codes ?
Can one database have multiple instances?
What is the FREE command?
How to find last record before record through SQLRPGLE?
how can u understand the end of the table ?
What does db2 stand for?