copy the data to another audit table with the id of the user who
deleted it with a timestamp when it was deleted.
The data in this table can be deleted once a week or a month as you
would like it.
--- Khedr, Waleed [EMAIL PROTECTED] wrote:
Another idea is to mark the record deleted instead of
:
Subject: RE: Need a delete trigger that
tracks deletes.
03/18/2002
We need to be able to track what records have been deleted from a table.
Our current thinking is
1. A before delete trigger, that stores a unique ID of the all the data in
the table.
2. A after delete trigger, which gets the records left in the table.
3. Subtract the two lists to find the
Why not simply a Before Delete trigger that copies the row about to be
deleted over to a duplicate table. This way you can know exactly what the
data was before it was deleted. Of course, if you only care about a
certain field or group of fields you can always just copy those fields
instead of
Sure. Create a journal table whose structure is the same as the table
of interest, with the addition of user, timestamp, and whatever
else you're interested in tracking. In your before delete trigger,
just write the about-to-be-deleted row to the journal table, with the
additional columns
Another idea is to mark the record deleted instead of physically deleting
it.
Regards,
Waleed
-Original Message-
Sent: Monday, March 18, 2002 5:18 PM
To: Multiple recipients of list ORACLE-L
We need to be able to track what records have been deleted from a table.
Our current