Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (20.3k points)

What's the difference between FOR and AFTER triggers?

1 Answer

0 votes
by (40.7k 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.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...