Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: delete some records from table, keeping data consistency ?
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