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 |
What is a database table in oracle?
How to use subqueries in the from clause in oracle?
Explain the use of rows option in imp command.
How to define an anonymous block?
How to define Data Block size ?
how to i write the query 'NISHI' TO N I S H I
4 Answers Attra, Metric Stream,
What is schema?
41 Answers Bodhi Global Services, Cognizant, HCL,
Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.
How to update a table row with a record?
How to check your oracle database 10g xe installation?
Will you be able to store pictures in the database?explain.
What is a synonym? What are its various types?