Firing a Trigger for Each Inserted Row

Microsoft’s SQL Server development team explains how to get a trigger to fire for each row that you insert.

1 Min Read
ITPro Today logo in a gray background | ITPro Today

I'm using an INSERT INTO...SELECT * FROM bulk statement to insert records into a table. If I write a trigger on the target table that executes on INSERT, will the trigger fire for each row inserted? If not, how can I get the trigger to fire for each row?

SQL Server triggers fire only once per statement, not once per affected row. So, you'll have to create the multiple-row updates yourself in your trigger.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like