home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,136 of 19,505   
   Gene Wirchenko to esquel@sommarskog.se   
   Re: SQL Server 2008: Trigger Question   
   02 Mar 11 12:51:11   
   
   XPost: microsoft.public.sqlserver.programming   
   From: genew@ocis.net   
      
   On Wed, 2 Mar 2011 07:51:01 +0000 (UTC), Erland Sommarskog   
    wrote:   
      
   >Gene Wirchenko (genew@ocis.net) writes:   
   >>           CREATE TRIGGER ... {FOR | AFTER | INSTEAD OF} ...   
   >> Do FOR and AFTER mean the same thing here?  In particular, I am   
   >> wondering whether a FOR trigger executes before or after the   
   >> underlying data is modified.  My text says before on one page and   
   >> after on the next, and MSDN is not clear either.   
   >   
   >FOR and AFTER are indeeed equivalent. Originally FOR was the only keyword.   
   >AFTER was added when they introduced INSTEAD OF.   
   >   
   >Notice that there are no BEFORE triggers in SQL Server, only INSTEAD OF.   
   >(In a real BEFORE trigger, you don't need to redo the command.)   
      
        Thank you.  And what about when the underlying data gets   
   modified?   
      
   Sincerely,   
      
   Gene Wirchenko   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca