
May 23rd, 2011, 01:17 PM
|
|
Contributing User
|
|
Join Date: Jan 2006
Location: Carlsbad, CA
|
|
|
I think you need an
after insert or update or delete trigger on the main table.
I suggest that the audit table has its own incrementing surrogate PK field plus a timestamp field to indicate the moment of insertion for sorting.
You will have to decide how to indicate deletion.
Insertion will simply be the earliest record containing the main table PK.
Last edited by clivew : May 23rd, 2011 at 01:19 PM.
Reason: Added comments about insertion and deletion
|