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

Home -> Community -> Usenet -> c.d.o.tools -> Help Needed With Delete Statement

Help Needed With Delete Statement

From: Dave Sutton <dpsutton_at_marchsystems.co.uk>
Date: Thu, 18 Jan 2001 15:16:38 -0000
Message-ID: <9470th$j19$1@newsreaderm1.core.theplanet.net>

Hi,

I hope someone out there can help me with this SQL problem!

I have a table of audit records which contains a date field.

What I need is an SQL statement to delete all but the 30 most recent records, based on this date field.

I tried using the clause:
WHERE ROWNUM > 30 but it appears you can't use "rownum >" and anyway, rownum does not always take into account the order clause.

Any help would be greatly appreciated.

Dave Received on Thu Jan 18 2001 - 09:16:38 CST

Original text of this message

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