I have the following stored procedure:
CREATE PROCEDURE UPDATE_MODIFICATION_DATE (IN TBLNAME VARCHAR(30), IN ROWID INTEGER)
P1: BEGIN
DECLARE store VARCHAR(1000);
SET store = 'UPDATE ' || TBLNAME || ' SET modification_date=CURRENT TIMESTAMP WHERE id='||ROWID;
PREPARE command FROM store;
EXECUTE command;
END P1
It gets a name of a table, an id of a row, and update the modification_date column to the current timestamp.
I don't know how to write a trigger what calls this procedure every time after a successful update or insert of a table. (So what i want to accomplish is to store when a row was last touched).
modification_datein the trigger itself will perform much better than invoking dynamic SQL in a separate stored procedure.before update...)