Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2004
    Posts
    25

    Unanswered: Help please for a Trigger!

    Hi everyone,
    I want to create a Trigger like this:
    after I insert a record in table A, I want to insert a record in table B with the same ID value.

    I appreciate your help,
    thank you very much

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    There are lots of examples of writing triggers here:
    Application Developer's Guide - Fundamentals.

  3. #3
    Join Date
    Dec 2004
    Location
    vienna, at
    Posts
    27
    you have to make a simple insert trigger:

    Code:
    create or replace trigger shema.trigger_name 
    after insert on shema.table_a for each row
    -- declaration
    
    begin
       ....
       -- with :new you get the values from inserted row
       
       insert into table_b(id) values(:new.id)
       ....
       
    end;
    phh

  4. #4
    Join Date
    Oct 2004
    Posts
    25
    Thank you so much!

Posting Permissions

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