Using :OLD and :NEW in oracle triggers without for each row
651558May 6 2010 — edited May 7 2010I'm using Oracle 10g.
I want to insert one row in log table for each query witch is executed on a table.
And I want to insert on row to a detailed log table for each row changed on a query.
I want to add modification date and time for each row in both log tables and I want it to be similar.
So I'm curious about using old and new variables without using for each row on trigger creation. Is it possible?
Or perhaps I may mark some variables like static for this query (so sysdate will be the same and some flag for small log insertion)?
Or perhaps there are some other means to do it?