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

Why select is not preferred in embedded sql programs?

1299


How do I import data from excel to db2?

1074


Is db2 free?

1094


What is the purpose of using commit?

1098


What is database manager in db2?

1023


Is ibm db2 free?

1012


What are foreign keys in db2?

1105


How to resolve deadlock issue

20133


If I have a view which is a join of two or more tables, can this view be updateable?

1139


What is the difference between cursor and select statement?

1102


What are concurrency issues?

1097


What is alias in db2?

1061


what are bind concepts in db2 cobol?

1093


What is dclgen (declaration generator)?

1059


i want to maintain uniqueness on pdf without make lf??????????

2158