Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    18

    Question Unanswered: Question concerning triggers

    Hi,

    Can anybody tell me how to translate the Oracle syntax :
    "if inserting then" ?

    Is it something like :
    "if COLUMNS_UPDATED() <> NULL" ?

    Another question concerning SQLServer triggers :
    What is the equivalent of a "before" in SQLServer ?

    Must I use 'INSTEAD OF" and then execute my insert ?

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    Look at the create trigger statement.

    You can create a trigger for insert.
    If you have an update, delete, insert trigger then the deleted virtual table will be empty.

    Yes instead of is the equivalent of a before trigger.

  3. #3
    Join Date
    Jul 2003
    Posts
    18
    In Oracle, we can have "before", "after" and "instead of"...
    What is the difference ? Do we translate "before" like "instead of" ?

    Thanks for help.

  4. #4
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    In sql server you get after and instead of.
    If you want the trigger to fire before updating the table then create an instead of trigger.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •