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.
Answers were Sorted based on User's Feedback
Answer / nithin
Hi
I could possibly think of only one solution without using
group by clause.
create table emp_bkp as select distinct * from employee
drop table employee
rename emp_bkp to employee
Let me know if there is any other possible answer
| Is This Answer Correct ? | 3 Yes | 1 No |
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 |
Explain the use of log option in exp command.
1) Does oracle have any table which contain all the exceptions and it's code internally?
Design database draw er diagram for a certain scenario ?
0 Answers Keane India Ltd, TATA,
sql command 2 know current database
what is the use of triggers in Java program? I mean where do we use triggers in Java programming?
how to find the n'th highest salary from emp ?
Explain about your project and its relation to the current job position you are applying to?
If a table column has is UNIQUE and has NOT NULL, is it equivalent to a PRIMARY KEY column?
Explain view?
What are the values that can be specified for OPTIMIZER MODE Parameter ?
What is a named program unit?
how to get count of tables in particular database in Oracle?