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 |
can any one help me with import/export options in oracle............
How to join two tables in a single query using oracle?
How many anonymous blocks can be defined?
i can't insert column value greater than 4000 characters at one instance even i am using CLOB datatype . how to insert efficiently more than 4000 characters ? And please let me know how to impose inline and out-of line constraints on oracle column??? Thanks in Advance... Prakash
Can we create trigger on materialized view in oracle?
how to see the data (in unix) using dataset in datastage?
How to drop an index?
find the second highest salary of the emp table
cursor attributes are %isopen ,%notfound,%found,%rowcount but is any attributes there other than these? please tell me asap ..
what is the maximum number of indexes i can create for a table? What happens if i create indexes for all the columns of a table? Will it slow down the speed of retrieval
What is an Oracle Instance?
how to get required data from oracle source is like this ram_05_seetha lax_05_viswa bamr05frummy run_01_away sw_sas_trim i want my target data like ram_05_seetha lax_05_viswa to get data using %_05_% but it will give ram_05_seetha lax_05_viswa bamr05frummy how can i get my target data?