Razzak,

Thanks.  Your response needs a little more info, as does RSynax.

Here are my findings:

This works:

ALTER TABLE TableName ADD TRIGGER UPDATE ProcName

This works, but it wiped out the BEFORE trigger:

ALTER TABLE TableName ADD TRIGGER UPDATE AFTER ProcName

This created BOTH update triggers:

ALTER TABLE TableName ADD TRIGGER +
UPDATE ProcName UPDATE AFTER ProcName

I haven't tested but am I to conclude that the following syntax would
create all possible triggers on the table?

ALTER TABLE TableName ADD TRIGGER +
INSERT ProcName INSERT AFTER ProcName +
UPDATE ProcName UPDATE AFTER ProcName +
DELETE ProcName DELETE AFTER ProcName

This was not fun,
Dennis McGrath




> A table can have both "BEFORE" and "AFTER" TRIGGERs,
> only one, or none.
> 
> Typical TRIGGER Usage:
> 
> BEFORE- data validation before the action (inventory
> checks, account limit checks)
> 
> AFTER- update of data dependent on primary keys,
> automated post transaction steps.
> 
> TRIGGERS use Stored Procedures
> 
> Procedures are stored in the database in the system
> table called SYS_PROCEDURES
> 
> Supporting system tables are SYS_PROC_COLS and
> SYS_PROC_MODS
> 
> Hope that helps!
> 
> If you need further details or examples of using
> BEFORE and AFTER TRIGGERS, feel free to ask on
> this Official List Server of R:BASE!
> 
> Enjoy and make sure to have fun!
> 
> Very Best R:egards,
> 
> Razzak.
> 

Reply via email to