Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Trigger

sheronasherona Member Posts: 11
When creating a trigger, how do I access the fields of the current row being updated?

Comments

  • GideonOmegaGideonOmega Member Posts: 617
    : When creating a trigger, how do I access the fields of the current row being updated?
    :
    for triggers I belive that there are two tables you can access one is the deleted table,(sorry can't remember the other one) for instance, when the record is deleted or updated - in the case of update the original data before the update is put into the deleted table so that you can access it from the same trigger that did the update.

    Sorry that I can't remember the name of the other table.
    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

  • WolfsbaneWolfsbane Member Posts: 12
    : : When creating a trigger, how do I access the fields of the current row being updated?
    : :
    : for triggers I belive that there are two tables you can access one is the deleted table,(sorry can't remember the other one) for instance, when the record is deleted or updated - in the case of update the original data before the update is put into the deleted table so that you can access it from the same trigger that did the update.
    :
    : Sorry that I can't remember the name of the other table.
    : [blue]
    : C:Dos
    : C:Dos Run
    : Run Dos Run
    : [/blue]
    :
    :
    The name of the second table is INSERTED. Inserted comes into play when you update or insert a record. The whole record is moved to the DELETED table and the new information is inserted as well as stored in the INSERTED table. When the record is commited (which would be after all triggers have acted) both tables are cleared and made ready for the next transaction.

Sign In or Register to comment.