Friday, June 17, 2011

Triggers in SQL

Just a note for all of you that are banging their heads against the laptop in front of you, there is no there is no Updated dummy table in SQL Server triggers. For an  AFTER UPDATE trigger, you need to use either the Deleted dummy table that contains the old values or the Inserted table that contains the new values.

It does make perfect sense once you know that this is the case, but considering SQL is trying to be a 'friendly' language, once again it has not gone far enough and created (short-lived) confusion on my part.

No comments: