DataBase trigger

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

I log in to SqlServer 2005
I right click on the database and select new Query.
Here I enter the create trigger command shown below and then click on the !
to run the command
The output was Command(s) Completed successfully
When I know look in folder Database Trigger within Programmability I can't
find the created trigger.

If I try to run the create trigger command again I get an error saying
"Msg 2714, Level 16, State 2, Procedure CategoryDelete, Line 4
There is already an object named 'CategoryDelete' in the database."

So my question is where can I find the trigger that I have created ?

create trigger CategoryDelete
on Categories
for delete as
update Products SET Discontinued = 1
FROM Products INNER JOIN Deleted ON
Products.CategoryID = Deleted.CategoryID

//Tony
 
Back
Top