Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: archiving records

Re: archiving records

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Mon, 28 Aug 2006 13:54:12 +0100
Message-ID: <4hp5f25ea8pco72ms27flf89sh6vr6eajs@4ax.com>


On 27 Aug 2006 21:58:05 -0700, "Daud" <daud11_at_hotmail.com> wrote:

> INSERT INTO MYTAB_ARC
> SELECT * FROM MYTAB WHERE ROWNUM < 100001';
>
> DELETE FROM MYTAB WHERE ROWNUM < 100001;
> -- have i deleted the same 100K rows that just got inserted?

 No, there's no guarantee at all here. It may perhaps appear to work, possibly, but it'll be more by coincidence than design. If you're sticking with this approach, you'd need to store the primary keys or rowids selected in the first statement in order to delete the right rows in the second statement.

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Mon Aug 28 2006 - 07:54:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US