Sunday, 11 August 2013

Emulate the behavior of INSTEAD OF INSERT trigger on table

Emulate the behavior of INSTEAD OF INSERT trigger on table

I've written a trigger like
CREATE TRIGGER myTrigger
INSTEAD OF INSERT ON myTable
EXECUTE PROCEDURE myFunction();
but I've learned that the INSTEAD OF trigger cannot be applied to a table.
The only way to do it should be by using
BEFORE OF INSERT
the trigger should retrieve some values (unknown when the user calls the
insert function) on the other table and insert this value inside firing
query and execute it. How can I do this?

No comments:

Post a Comment