How will you delete duplicate records from a table?
Answer Posted / naresh.s
in DB2
first we need to know duplicate records in database file
like tmpfilep ,for that
select RRN(A) from tmpfilep A where field='fieldvalue'
here field means any fileld containd tmpfilep and
corresponding value.
once we execute the above query we will get relative record
numbers of each row and remember that numbers
now you can delete records based on these numbers
delete from tmpfilep A where rrn(A) in (234,341,642)
here 234,341,642 are sample record numbers
may be i am correct upto my knowledge.......
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why select is not preferred in embedded sql programs?
How do I import data from excel to db2?
Is db2 free?
What is the purpose of using commit?
What is database manager in db2?
Is ibm db2 free?
What are foreign keys in db2?
How to resolve deadlock issue
If I have a view which is a join of two or more tables, can this view be updateable?
What is the difference between cursor and select statement?
What are concurrency issues?
What is alias in db2?
what are bind concepts in db2 cobol?
What is dclgen (declaration generator)?
i want to maintain uniqueness on pdf without make lf??????????