Re: Yukon and "BEFORE" triggers??
From: Steve Kass (skass_at_drew.edu)
Date: 09/10/04
- Next message: Tinoco: "Transact language limitation?"
- Previous message: Eric Sabine: "Re: Transact language limitation?"
- In reply to: Toby Herring: "Re: Yukon and "BEFORE" triggers??"
- Next in thread: Steve Kass: "Re: Yukon and "BEFORE" triggers??"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 15:50:22 -0400
I see. The Oracle functionality is not part of the SQL standard, as far as
I know, at least in terms of changing the "new" rows. The ability to have
triggers work on each row is a part of the SQL-99 standard, but I guess it's
a question of whether you want something proprietary and convenient, or
something that conforms, but not fully, to the standard...
SK
"Toby Herring" <therring*@*teletrack.com> wrote in message
news:e2hjNt0lEHA.2948@TK2MSFTNGP11.phx.gbl...
>I can think of two benefits off the top of my head.
>
> In some instances, it would be nice to be able to alter the contents of
> the [inserted] table in the trigger, and have the modified contents end up
> in the DB instead of having to perform an update directly on the real
> table. (Semantics, I know, but in some cases it just "feels" better.)
>
> Another useful effect would be the ability to throw an exception in the
> trigger, preventing an insert from ever happening, which would (possibly)
> prevent a "skipped" value in an identity column. Whereas now, the insert
> happens (identity assigned) then you throw an exception in the trigger,
> which rolls back the insert, but leaves the assigned identity unused.
>
> --
> Toby Herring
> MCDBA, MCSD, MCP+SB
> Need a Second Life?
> http://secondlife.com/ss/?u=03e0e5b303c234bf08e80ee40119a65e
>
>
> "Steve Kass" <skass@drew.edu> wrote in message
> news:%231D969zlEHA.2820@TK2MSFTNGP15.phx.gbl...
>> Hitchhiker,
>>
>> If you want to "simply tweak the data," how will a BEFORE trigger help?
>> The trigger code executes before the insert/update/delete, but I didn't
>> think it could change anything about the subsequent modification -
>> INSTEAD OF triggers are the way to do that, aren't they? It would be
>> handy to be able to check things before a modification, or short of
>> having BEFORE triggers, to be able to defer constraint checking until
>> after a DML statement, which would make INSTEAD OF triggers more useful.
>>
>
- Next message: Tinoco: "Transact language limitation?"
- Previous message: Eric Sabine: "Re: Transact language limitation?"
- In reply to: Toby Herring: "Re: Yukon and "BEFORE" triggers??"
- Next in thread: Steve Kass: "Re: Yukon and "BEFORE" triggers??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|