Reputation: 4075
I am creating a database level trigger which should only perform a certain action based on which tables were updated.
With a regular trigger I would just use IF UPDATED(column)
.
Is there some way to determine not just the column that was updated but also the table?
Upvotes: 1
Views: 519
Reputation: 3866
You can't create DDL TRIGGER ON UPDATE
DDL triggers, like standard triggers, execute stored procedures in response to an event. But unlike standard triggers, they do not execute in response to UPDATE, INSERT, or DELETE statements on a table or view. Instead, they primarily execute in response to data definition language (DDL) statements. These include CREATE, ALTER, DROP, GRANT, DENY, REVOKE, and UPDATE STATISTICS statements. Certain system stored procedures that perform DDL-like operations can also fire DDL triggers.
Upvotes: 1