Results 1 to 2 of 2

Thread: Trigger

  1. #1
    Join Date
    Jun 2004
    Posts
    32

    Unanswered: Trigger

    Hi
    UDB version 8.01.0005
    Need help in constructing a trigger, All it does is copies the contents to another table, has to be trigger on insert or update.

    My Question
    could I have both INSERT and UPDATE trigger in one trigger. Does it work or I need to seperate them.

    CREATE TRIGGER NEW_HIRE
    AFTER INSERT ON EMPLOYEE
    AFTER UPDATE ON EMPLOYEE
    FOR EACH ROW MODE DB2SQL
    UPDATE COMPANY_STATS SET NBEMP = NBEMP + 1

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need two triggers.

    Andy

Posting Permissions

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