OLD and NEW in DB TRIGGERS

From: Kevin Merritt <merrittk_at_ix.netcom.com>
Date: 1996/04/12
Message-ID: <4kls7s$7va_at_dfw-ixnews7.ix.netcom.com>#1/1


There's a lot of "press" advocating converting DB triggers to stored procedures when the trigger exceeds 60 lines of code. This is all well and good, but how can I have access to the correlation rows OLD and NEW in my stored procedure? I want to see the before and after values from inside my stored procedure.

For example, in my DB trigger I want to call my stored procedure

CREATE TRIGGER xxx
AFTER UPDATE
ON TABLE_YYY
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
BEGIN
    XXX_TRG_STORPROC(old, new);
END; Any bright ideas would be appreciated. Received on Fri Apr 12 1996 - 00:00:00 CEST

Original text of this message