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: delete some records from table, keeping data consistency ?

Re: delete some records from table, keeping data consistency ?

From: Reza <reza_at_digital-dispatch.co.uk>
Date: Mon, 14 Aug 2000 13:06:38 +0100
Message-ID: <966254858.25978.0.nnrp-04.d4f07aaa@news.demon.co.uk>

which last 100 record (comparitively speaking you do not mention the selection criteria)? is that the insertion order?

Reza
<y.abiad_at_waika9.com> wrote in message
news:QCGl5.3116$9U2.8523835_at_nnrp3.proxad.net...
> Hi everybody,
>
> I'd like to keep only the 100 last records from a table. Do y have an idea
> ??
>
> SQL> SELECT COUNT(*) from emp ;
> ==> 150
> SQL> DELETE FROM EMP WHERE ROWNUM < 101 ;
>
> the pb here is :
> - The clause ROWNUM may don't really select the 100 last records
> - Data Consistency : If we delete table EMP, what about other data on to
> tables with relation ship.
>
> Do y have an idea ?????
>
>
>
>
>
Received on Mon Aug 14 2000 - 07:06:38 CDT

Original text of this message

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