Click here to Skip to main content
15,891,706 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a trigger :
 create trigger tt
   on Mytable
   AFTER INSERT 
  AS
   BEGIN
   INSERT INTO Mytable(id) values(10)
END

QUESTION : This should fire indefinately, but it doesn't. Why ?
Posted
Updated 14-Dec-10 22:04pm
v2
Comments
Sandeep Mewara 15-Dec-10 3:33am    
Sounds like you had an interview yesterday or today! Lots of questions like that...
Toniyo Jackson 15-Dec-10 4:04am    
Always write your code inside code block

This is by design. You can find information about it here[^]
 
Share this answer
 
It has to do with sp_dboption and sp_configure. Follow the link and search for "recursive triggers setting". That pretty much explains it.

http://msdn.microsoft.com/en-us/library/aa258254(v=sql.80).aspx


Good luck,

Manfred
 
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