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
 SQL Server Development (2000)
 Can we use triggers in SP or vise versa ???

Author  Topic 

shekhar_dba
Starting Member

39 Posts

Posted - 2006-11-02 : 17:04:27

Hi guru's
My question is Can we use triggers in SP or vise versa ???

thanks
shekhar

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-02 : 17:09:57
No. Can't. Trigger fires / executes whenever there is an Insert / Update / delete on the table. Whereas Stored Procedures not. It is execute by application


KH

Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-11-03 : 12:38:49
If you are asking if triggers will execute when tables are modified from within a stored procedure ... the answer is yes.
If you are asking if you can execute stored procedures from within a trigger ... the answer is yes.



Jay White
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-03 : 13:34:40
"the answer is yes(2)"

Although you are likely to get into trouble if the SProc you call tries to update the table that fired the trigger ...

Kristen
Go to Top of Page
   

- Advertisement -