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...

There is a big table with "n" of rows and 40 + columns .It
doesn't have primary key.How do you select the primary key.
In other words how do you get the duplicate records.

Answer Posted / harikanth

Suppose Table name is Dup_Del with id as a column(consists
10,20,30,10,10,30,20)then

select * from Dup_Del
where rowid not in(select * from
(select min(rowid) from Dup_Del
group by id
);
the above query will give you the duplicate records. if you
want unique records then

select * from Dup_Del
where rowid in(select * from
(select min(rowid) from Dup_Del
group by id
);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ordinary table in oracle?

1166


What are the different types of trigger and explain its various uses and functions?

1101


Explain the use of file option in exp command.

1139


Explain an extent?

1109


How to define an anonymous block?

1166


How to start your 10g xe server from command line?

1076


Explain how you would restore a database using RMAN to Point in Time?

2151


How to update values on multiple rows in oracle?

1041


What is a named program unit?

1093


How do you tell what your machine name is and what is its IP address?

2101


How to load data through external tables?

1142


What are the ways tablespaces can be managed and how do they differ?

2378


Can we commit inside a function in oracle?

972


Explain oracle 12c new features for developers?

1063


Explain the use of compress option in exp command.

1026