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

delete some records from table, keeping data consistency ?

From: <y.abiad_at_waika9.com>
Date: 2000/08/13
Message-ID: <QCGl5.3116$9U2.8523835@nnrp3.proxad.net>#1/1

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 Sun Aug 13 2000 - 00:00:00 CDT

Original text of this message

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