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 |
When is the skeleton cursor table created?
What is bind in db2?
What are foreign keys?
the dd name for ksds is dest1 and what is the dd name for alternate index of ksds ? a.dest b.dest1 c.dest1a d.dd1
What are the contents of a dclmgen?
Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
how many partitions are possible in partitioned tablespace? dont say 1-64. a)240 b)256 c)512 d)none
Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?
Why PS file called Physical seqential file?How to sore data in sequential file and ESDS file? What is the use of DBRM,PLAN,package and Collection.
What are the contents of dclgen?
What is db2 bind process?