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 to start instance with a minimal initialization parameter file?

536


How to do a full database export?

637


Give the different types of rollback segments.

580


How does Oracle guarantee data integrity of data changes?

1936


We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.

4931






Can multiple cursors being opened at the same time?

614


Explain the use of indexes option in exp command.

591


Explain the use of rows option in imp command.

604


Can we create database in oracle using command line ?

584


 What are the oracle DML commands possible through an update strategy?

582


Explain about functional dependency and its relation with table design?

552


Can you have more than one content canvas view attached with a window ?

1817


What are the major difference between truncate and delete?

519


How to connect the oracle server as sysdba?

633


What are the attributes that are found in a cursor?

650