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

How does Oracle guarantee data integrity of data changes?

1930


Write a syntax for update query in oracle?

606


how to code performance tuning of oracle PL/SQL? can any body send me the perfect answer?

4659


Give the advantages and disadvantages of clusters.

568


How to use windows user to connect to the server?

527






What happens to the data files if a tablespace is dropped?

567


How to convert times to characters in oracle?

599


How different is ms access and oracle?

537


How to display employee records who gets more salary than the average salary in the department?

584


What are dml statements in oracle?

610


What would you do with an in-doubt distributed transaction?

1465


What is blob datatype?

562


What privilege is needed for a user to create views in oracle?

581


nw i'm doing MBA system and planning to do oracle,database management.tell me that whether it is useful r not?.refer any course for my carrier pls

1731


What is materialized view in Oracle?

626