0 votes
1 view
in SQL by (22.4k points)

What's the difference between FOR and AFTER triggers?

1 Answer

0 votes
by (40.3k points)

Source code:

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

Is the same as this code:

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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...