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 an oracle function?
How to create a new table by selecting rows from another table?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
What are the differences between lov and list item?
Explain parameter file in oracle.
Difference between inner join vs where ?
how do we code triggers , store procedure , Performance tuning and indexing in a Java Project? Pls kindly get me the perfect answer with the code for each....thank you in advance............pls any body kindly help me soon as possible....
Whats the benefit of dbms_stats over analyze?
How to change system global area (sga) in oracle?
Difference between open_form and call_form in oracle.
What suggestions do you have to reduce the network traffic?
What is a trigger and what are its types?
What is oracle join syntax?
How to create a new view in oracle?
I just want to maintain data like an employee can belongs to 3 or more departments . We can resolve this by using composite key but it avoids normalization rules. So Can anyone tell me how can I maintain data.