explain plan set statement_id = '123456' for
delete from dup1 d1
where rowid >
( select min(rowid) from dup1 d2 where d1.num = d2.num );
SELECT LPAD(' ',2*(level-1)) || operation || ' ' || options || ' '
||object_name||' '||
DECODE(id,0,'Cost = '|| position) AS "Query Plan"
FROM plan_table
START WITH id = 0
AND statement_id='123456'
CONNECT BY PRIOR ID = PARENT_ID
AND statement_id = '123456';
Analyst Programmer - OCE JWCD 6. OCP JAVA SE 6. OCP in 10g DBA. SQL Expert
This is a blog of programming, database administration and
problem analysis. This blog is for sharing knowledge to help me. I like to analysis and play with code and I've intention to solve any kind Java, Struts 2, Java EE, JSF 2, Enterprise Java Bean, Spring, Web Service, GlassFish, Weblogic, JBOSS and Advanced PL/SQL puzzle. If you've any technical question just mail me, i'll reply in short.
Monday, May 9, 2011
Delete Duplicate Rows from a table
delete from dup1 d1
where rowid >
( select min(rowid) from dup1 d2 where d1.num = d2.num )
OR
delete from dup1 d1
where rowid <
( select max(rowid) from dup1 d2 where d1.num = d2.num )
where rowid >
( select min(rowid) from dup1 d2 where d1.num = d2.num )
OR
delete from dup1 d1
where rowid <
( select max(rowid) from dup1 d2 where d1.num = d2.num )
Subscribe to:
Posts (Atom)