Re: How to distinguish operation type in trigger?
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 4 Jun 2007 21:15:44 +0000 (UTC)
Seribus Dragon (Seribus.news@xxxxxxxxxxx) writes:
Why not just break up the action into three triggers? if there is
common code use a stored procedure got that part.
That can be problematic, if you need to refer to the inserted/deleted
tables, which you often do in triggers.
Most of my triggers are for INSERT and UPDATE, but I have a couple
that are for all three actions.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Re: How to distinguish operation type in trigger?
- From: Seribus Dragon
- Re: How to distinguish operation type in trigger?
- Prev by Date: Re: Copy Row Of Data From Table to Table In Same DB
- Next by Date: Re: ADODB Command (Stored Procedure)
- Previous by thread: Re: How to distinguish operation type in trigger?
- Next by thread: Copy Row Of Data From Table to Table In Same DB
- Index(es):
Relevant Pages
|
Loading