Thursday, February 14, 2013 9:26 PMIs there any Micorosft documentation explicitly stating that SQL Server only supprrts statement level triggers
Thursday, February 14, 2013 9:40 PM
Hey Chuck, You mean DML triggers i.e., triggers that execute on insert, update, or delete statements? I don't know which version of SQL Server you're using, but I believe SQL Server 2005 and up support DDL and logon triggers as well:
Friday, February 15, 2013 1:33 AM
Many Thanks & Best Regards, Hua Min
Friday, February 15, 2013 2:23 AM
There are three kinds of triggers in SQL Server:
Creates a DML, DDL, or logon trigger in SQL Server 2012. A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server.
The kind you mean is a DML Trigger:
DML triggers is a special type of stored procedure that automatically takes effect when a data manipulation language (DML) event takes place that affects the table or view defined in the trigger. DML events include INSERT, UPDATE, or DELETE statements.
Of course you can typically emulate a row trigger with a statement trigger and a cursor loop, if you really need to. But statement triggers are set-based and generally preferable.