Difference between FOR and AFTER triggers?

sqlchild picture sqlchild · Mar 17, 2011 · Viewed 77.2k times · Source

What's the difference between FOR and AFTER triggers?

Answer

Ben picture Ben · Mar 17, 2011

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.