Fire trigger for every inserted row using SqlBulkCopy

前端 未结 4 1069
清歌不尽
清歌不尽 2021-01-19 03:31

I am using SqlBulkCopy class to insert 50k rows at a time in table tbl_records I have set a After Insert trigger on this table and usi

4条回答
  •  北海茫月
    2021-01-19 04:04

    I Have try this and it will work for.

    I hope its help you..

    CREATE TRIGGER Triggername ON TableName After INSERT AS SET NOCOUNT ON;

    insert into TargetTable (Fields) SELECT (i.field1,i.field2,i.field3,....,i.fieldn) FROM inserted i GO

提交回复
热议问题