Question:

SQL ==> Creating a Trigger ?!?!?!?

by  |  earlier

0 LIKES UnLike

i need to create a trigger that after inserting a row into table a

gets 2 fields from the inserted row, and insert them into table b

can anyone give me a sample on how to do this?

SQLServer

 Tags:

   Report

1 ANSWERS


  1. CREATE TRIGGER trig_addTOTable2

    ON table1

    FOR INSERT

    AS

    INSERT INTO tables(fld1,fld2) values( inserted.fld1,inserted.fld2)

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.