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
What is ordinary table in oracle?
What are the different types of trigger and explain its various uses and functions?
Explain the use of file option in exp command.
Explain an extent?
How to define an anonymous block?
How to start your 10g xe server from command line?
Explain how you would restore a database using RMAN to Point in Time?
How to update values on multiple rows in oracle?
What is a named program unit?
How do you tell what your machine name is and what is its IP address?
How to load data through external tables?
What are the ways tablespaces can be managed and how do they differ?
Can we commit inside a function in oracle?
Explain oracle 12c new features for developers?
Explain the use of compress option in exp command.