tags:

views:

255

answers:

1

Hi All,

Is it possible to create a trigger on a table that is initiated when ANY dml is performed on the table?

For example -- I need to ensure that no insert/update/delete statements can be run on the weekend. So, instead of writing:

CREATE TRIGGER DENY_DML_1 BEFORE INSERT...

CREATE TRIGGER DENY_DML_2 BEFORE UPDATE...

CREATE TRIGGER DENY_DML_3 BEFORE DELETE...

...is it possible to write one trigger to rule them all?

Many thanks in advance! ~Daniel

A: 

No. From the documentation:

*trigger_event* indicates the kind of statement that activates the trigger. The *trigger_event* can be one of the following: INSERT... UPDATE... DELETE...

wallyk
Thank you for confirming. I was pretty sure I was going to have to write a trig for each event, but I thought I'd get community feedback before going the extra mile. Thank you!
ajax81