No, the trigger isn't invoked by that statement - the triggers is fired from the RDBMS because the condition it's defined for (INSERT
, UPDATE
or DELETE
) has occurred.
The trigger is totally asynchronous from the actual statement, and no, you cannot get the T-SQL query that caused the trigger to fire. All you can rely on are the Inserted
and Deleted
pseudo tables that are available inside the trigger which tell you what rows were inserted, deleted, updated.