Add trigger to all tables in schema

The code below will add a trigger to all the tables in a specific schema on the Microsoft
SQL-server.

 

2 thoughts on “Add trigger to all tables in schema

  1. Got this error when I tried it:
    Msg 207, Level 16, State 1, Procedure [dbo].[MyTable]_trig, Line 8 [Batch Start Line 0]
    Invalid column name ‘cpr’.

Leave a Reply to Amr Elgarhy Cancel reply

Your email address will not be published. Required fields are marked *