Re: understanding triggers and "inserted" and "deleted"
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 10/04/04
- Next message: Sue Hoegemeier: "Re: Newbie questions about 'trusted connections'"
- Previous message: Adam Machanic: "Re: Stored Proc keeps slowing down."
- In reply to: Maury Markowitz: "understanding triggers and "inserted" and "deleted""
- Next in thread: Maury Markowitz: "Re: understanding triggers and "inserted" and "deleted""
- Reply: Maury Markowitz: "Re: understanding triggers and "inserted" and "deleted""
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 4 Oct 2004 14:11:37 -0400
"Maury Markowitz" <MauryMarkowitz@discussions.microsoft.com> wrote in
message news:FCA225B5-FE54-4259-8EB9-9BF0CDD7E6F6@microsoft.com...
>
> Let's say my COMMIT have two inserts and two updates. I have separate
> triggers for INSERT and UPDATE, and thus I can imaging four different
> scenarios:
>
> 1) triggers are called one after the other, with the inserted and deleted
> being different each time (ie, two rows, then another two rows)
You were closest with this guess... You'll actually end up firing the
trigger(s) 4 times. Once per insert (2) and once per update (another 2).
Unless you meant that the insert/update affected two rows each, in which
case the trigger(s) would get fired twice, once for the insert and once for
the update.
- Next message: Sue Hoegemeier: "Re: Newbie questions about 'trusted connections'"
- Previous message: Adam Machanic: "Re: Stored Proc keeps slowing down."
- In reply to: Maury Markowitz: "understanding triggers and "inserted" and "deleted""
- Next in thread: Maury Markowitz: "Re: understanding triggers and "inserted" and "deleted""
- Reply: Maury Markowitz: "Re: understanding triggers and "inserted" and "deleted""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|