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
How to start instance with a minimal initialization parameter file?
How to do a full database export?
Give the different types of rollback segments.
How does Oracle guarantee data integrity of data changes?
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.
Can multiple cursors being opened at the same time?
Explain the use of indexes option in exp command.
Explain the use of rows option in imp command.
Can we create database in oracle using command line ?
 What are the oracle DML commands possible through an update strategy?
Explain about functional dependency and its relation with table design?
Can you have more than one content canvas view attached with a window ?
What are the major difference between truncate and delete?
How to connect the oracle server as sysdba?
What are the attributes that are found in a cursor?