Subject | yes they do |
---|---|
Author | GrumpyRain |
Post date | 2004-11-30T22:23:42Z |
old.field will still refer to the field value before the update was
run. The main difference is that if your trigger forces a trigger to
run on another table, and that tables trigger refers to your table,
then if will see the new value instead of the old value.
It is a technicality. Most triggers could be equally implemented
before or after an update, but there are some that only work in one or
the other.
Not 100% on this paragraph, but 75% sure. It is also worth considering
whether it requires more resources to process an after update trigger
if an exception is raised. The before update trigger wouldn't have
written anything to disk yet, but the after update will have written
the value then roll it back.
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
run. The main difference is that if your trigger forces a trigger to
run on another table, and that tables trigger refers to your table,
then if will see the new value instead of the old value.
It is a technicality. Most triggers could be equally implemented
before or after an update, but there are some that only work in one or
the other.
Not 100% on this paragraph, but 75% sure. It is also worth considering
whether it requires more resources to process an after update trigger
if an exception is raised. The before update trigger wouldn't have
written anything to disk yet, but the after update will have written
the value then roll it back.
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
> Hello Wayne,apply
>
> > I do not how to reference the value of a current field in the After
> > Update Trigger of a Table.
> >
> > I know of the old.Field and the new.field but I guess these do not
> > to the "After Upate" Trigger.MS SQL
>
> I think they do.
>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL &
> Server.
> Upscene Productions
> http://www.upscene.com