Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Help Needed With Delete Statement
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