Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the rules for db2 programming?

1040


What is bind plan?

978


Is ibm db2 open source?

1012


How to get the ddl of a table in db2?

1071


Which component is responsible for db2 startup and shutdown?

980


What does db2 blu stand for?

1100


What is the default page size of buffer pools?

1069


How many databases are there?

989


What is the use of with ur in db2?

996


What is the physical storage length of time data type?

1063


Define buffer pool.

996


What are the two types of logging in the db2 database? Explain them.

1016


Can we insert update delete in view?

908


What is a db2 package?

987


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.

3144