Microsoft® SQL Server™ 2000 provides two options when designing triggers:
This table compares the functionality of the AFTER and INSTEAD OF triggers.
| Function | AFTER trigger | INSTEAD OF trigger |
|---|---|---|
| Applicability | Tables | Tables and views |
| Quantity per table or view | Multiple per triggering action (UPDATE, DELETE, and INSERT) | One per triggering action (UPDATE, DELETE, and INSERT) |
| Cascading references | No restrictions apply | Are not allowed on tables that are targets of cascaded referential integrity constraints. |
| Execution | After:
|
Before:
In place of:
After:
|
| Order of execution | First and last execution may be specified | Not applicable |
| text, ntext, and image column references in inserted and deleted tables | Not allowed | Allowed |