Execute a store procedure when a row is inserted in a table

  • I need to execute a stored procedure when a row is inserted in a table (Table A). The stored procedure inserts a row in other table (Table B).

    How can I do that the sql server detects that a row was inserted in a Table A and then execute the store procedure?

    I try to program as a job, but I don´t Know How the sql server can detect that a row was inserted in a Table A.

    Thanks

    Viky

  • add an insert trigger on the table where you want the event to be detected.

  • How can add an insert trigger?

    I never use a trigger

  • No time like the present to learn.

    http://www.google.com/search?q=%22SQL+Server%22+%22Insert+Trigger%22

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply