Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Trigger here:

1.UPDATE TABLE_NAME SET VALUE = @VALUE

now i execute the above query means trigger will execute now

TRIGGER
AFTER UPDATE
AS
BEGIN
.
.
2.UPDATE TABLE_NAME SET VALUE = @VALUE
.
.
END


now 2nd update query execute means again trigger will execute or not this is my question.
Posted
Comments
[no name] 2-May-13 10:02am    
why not just use a loop. if you want to way a little bit then just put a sleep function. your question is not very clear.
Prasad Khandekar 2-May-13 11:41am    
Please have a look at this article (http://blog.sqlauthority.com/2007/05/18/sql-server-2005-understanding-trigger-recursion-and-nesting-with-examples/) or (http://msdn.microsoft.com/en-IN/library/ms190739.aspx)
MURALIBALA1991 3-May-13 3:01am    
ya thank you for your link...my problem cleared..thank you so much.
Maciej Los 5-May-13 17:48pm    
Please, post it as an answer.
MURALIBALA1991 7-May-13 7:22am    
Use this query
ALTER DATABASE DatabaseName
SET RECURSIVE_TRIGGERS ON

1 solution

Yes, You can use Cursor in it and can do operation until fetch status equal to 0.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900