Difference between FOR and AFTER triggers? Ask Question

Difference between FOR and AFTER triggers? Ask Question

What's the difference between FOR and AFTER triggers?

ベストアンサー1

There is no difference, they do the same thing.

CREATE TRIGGER trgTable on dbo.Table FOR INSERT,UPDATE,DELETE

Is the same as

CREATE TRIGGER trgTable on dbo.Table AFTER INSERT,UPDATE,DELETE

An INSTEAD OF trigger is different, and fires before and instead of the insert and can be used on views, in order to insert the appropriate values into the underlying tables.

おすすめ記事