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

hey friends, What are the steps I can do to transfer the database from Microsoft Access 2003 to oracle10g (or SQL) Best regards

1562


What is background process in Oracle?

626


How to connect to a local oracle 10g xe server?

533


Can objects of the same schema reside in different tablespace?

584


Which dictionary tables and/or views would you look at to diagnose a locking issue?

1488






What is a initialization parameter file in oracle?

584


How to load a large xml file?

584


How to delete all rows a table in oracle?

621


What are the limitations oracle database 10g xe?

570


How to export data with a field delimiter?

582


What are named parameters?

614


What is a nested table?

628


How do I manually create a database in oracle?

546


What is the dynamic sql in oracle?

597


What are the data types in oracle?

550