Re: difference between FOR INSERT and AFTER INSERT triggers



Ford Desperado (ford_desperado@xxxxxxxxx) writes:
> I've been reading the docs and playing around, but I'm still not
> getting the difference.

That is because there isn't any!

If memory servers, FOR was the original syntax. I suspect that AFTER
has been added to align with ANSI standards. FOR is not very precise,
where as AFTER tells us that the trigger fires after the statement.
That in difference to BEFORE and INSTEAD OF triggers. (Of which SQL
Server has the latter, but not the former.)


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
.



Relevant Pages

  • Re: @@Identity
    ... > SQL Server is questionable at best. ... if a trigger fires or other ... > code executes that changes a row in any table, ... > might not be a factor for simple systems, but as developers make their ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: trigger question
    ... For starters, a trigger fires once per ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Error on Trigger Launch
    ... Ohoh, that won't fly. ... A trigger fires once per statement, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: trigger question
    ... For starters, a trigger fires once per ... wondering if I can let the SQL server do the dirty work. ...
    (comp.databases.ms-sqlserver)
  • Re: VFP 9 and file size limits
    ... bullheadedness before accusing people of evil. ... whether a protectionist stance, if that's what's occurring in this ... My reading of the situation suggests that MS simply cannot "see" the ... SQL Server (after all, there are quite good open-source free or cheap ...
    (microsoft.public.fox.programmer.exchange)