Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to save a trigger in sql server enterprise manager studio

i can right click on a table and go to the Triggers folder and click "New Trigger". I can then fill out the SQL for the trigger but when i click save, it just wants to save it to a ".sql" file.

How to i "commit" this trigger to the table ?

EDIT:

as per my comment below, i did hit execute but it wasn't showing up in the "Triggers" folder. It looks like you have to click "Refresh" for it to show up.

like image 785
leora Avatar asked Feb 28 '23 20:02

leora


2 Answers

Hit Execute or F5

like image 54
Nick Avatar answered Mar 26 '23 15:03

Nick


You just run the trigger, it should start with CREATE TRIGGER, so just hit execute

like image 33
Glenn Slaven Avatar answered Mar 26 '23 17:03

Glenn Slaven