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
What are the rules for db2 programming?
What is bind plan?
Is ibm db2 open source?
How to get the ddl of a table in db2?
Which component is responsible for db2 startup and shutdown?
What does db2 blu stand for?
What is the default page size of buffer pools?
How many databases are there?
What is the use of with ur in db2?
What is the physical storage length of time data type?
Define buffer pool.
What are the two types of logging in the db2 database? Explain them.
Can we insert update delete in view?
What is a db2 package?
I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.