Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Disable trigger

Author  Topic 

ChrisH
Starting Member

3 Posts

Posted - 2004-04-19 : 12:38:15
If I want to create a store procedure that will modify a table, how can I prevent triggers from running?

gwhiz
Yak Posting Veteran

78 Posts

Posted - 2004-04-19 : 12:44:41
Look at ALTER TABLE table DISABLE TRIGGER triggername.

You will need to embed this within your stored procedure. Just remember to ENABLE TRIGGER at the end of the stored procedure.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-04-19 : 12:46:24
What do you mean by modify? INSERT, UPDATE, or DELETE? Or do you mean ALTER TABLE?

Tara
Go to Top of Page

ChrisH
Starting Member

3 Posts

Posted - 2004-04-19 : 12:47:45
quote:
Originally posted by gwhiz

Look at ALTER TABLE table DISABLE TRIGGER triggername.

You will need to embed this within your stored procedure. Just remember to ENABLE TRIGGER at the end of the stored procedure.



That's what I was looking for.
Go to Top of Page
   

- Advertisement -