Re: Question on triggers before update
- From: "Uri Dimant" <urid@xxxxxxxxxxx>
- Date: Mon, 17 Aug 2009 12:46:32 +0300
Hi Simon
For sure triggers have their place and there are many situations where we
need using it. SQL Server 2005 and onwards has a great feature an OUTPUT
command to 'replace' triggers and I think you should look into... Now to
your questions
1) You will have to add some logic to handle open transactions and ROLLBAK
in case of error..
For example if you have an identity property on the column and trigger has
to insert some data into the table but failed so you will see that an
identity value will be increased anyway
2) Yes , in some cases, but you should test it
"Simon Whale" <simon@xxxxxxxxxx> wrote in message
news:u8PISqxHKHA.5256@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a theoretical question on Triggers. The scenario is explained
below.
I want to make a trigger that before an update is triggered that it
records the values that are to be changed into a historical table. hope
the actions that im trying perform make sense
My question is what;
1. will happen to the update if the trigger fails (due to some unforeseen
event!)
2. does this increase overheads significantly
Many thanks
Simon Whale
.
- Follow-Ups:
- Re: Question on triggers before update
- From: Simon Whale
- Re: Question on triggers before update
- References:
- Question on triggers before update
- From: Simon Whale
- Question on triggers before update
- Prev by Date: Question on triggers before update
- Next by Date: Re: What is it with you Jo Celko
- Previous by thread: Question on triggers before update
- Next by thread: Re: Question on triggers before update
- Index(es):
Relevant Pages
|