SQL Server Trigger - Change Required

I need to change a trigger in SQL Server. After I do this, I just start the trigger, similar to how I will do for the stored procedure?

ALTER TRIGGER 
+4
source share
3 answers

Yes, that's right, just use ALTER . If you right-click a trigger in the Object Explorer in SSMS and select Script Trigger as / ALTER TO, you will see the ALTER statement created for your trigger.

+3
source
 ALTER TRIGGER triggerName ON tableName FOR INSERT -- or update & delete AS -- sql here 

http://msdn.microsoft.com/en-us/library/ms176072.aspx

+3
source

You are not executing a trigger. Triggers β€œfire” at specific points depending on your definition.

For example, an AFTER UPDATE trigger fires for all updated rows after sending the UPDATE command to the table in which the trigger is created.

+1
source

Source: https://habr.com/ru/post/1387600/


All Articles