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
Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.
What is an oracle table?
Explain the use of record length option in exp command.
What is sequence?
Oracle
How to export data with a field delimiter?
How to pass a parameter to a cursor in oracle?
What is the difference between $oracle_base and $oracle_home?
What is connection pool in oracle?
Explain the use of grant option in imp command.
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.
How to define and use table alias names in oracle?
What is redo log?
How to drop an existing table in oracle?
Explain the use of online redo log files in oracle.