SQL Server 2008 MERGE and Triggers

Last Post 24 Nov 2008 05:39 AM by SwePeso. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
BarryFlynn
New Member
New Member

--
24 Nov 2008 12:51 AM
I haven't installed SQL Server 2008 yet.
However I have read that it has a new Merge statement, which does a Insert/Update as appropriate.
My concern is with Triggers on the table.

If you have a Trigger for both Insert & Update, and then execute a Merge, does the trigger fire twice (once for the rows Inserted & once for the rows Updated)?
Or does it just fire once - which would mean that the Deleted "table" would hold some records, but not as many as the Inserted "table".

Thanks

Barry
SwePeso
New Member
New Member

--
24 Nov 2008 05:39 AM
BarryFlynn
New Member
New Member

--
24 Nov 2008 12:50 PM
Thanks

Barry


Acceptable Use Policy
---