我试图创建一个触发器,从另一个表中插入数据到一个表中,该表也刚刚插入了数据,但是每次我在主表中添加一条记录,它在另一个表中添加了超过 4000 条记录。下面是我的代码。
USE [TeesdockDB new ]
ALTER TRIGGER [dbo].[B/WeigherUpdate] ON [dbo].[TBL Combined Board and Reg]
After INSERT AS
INSERT INTO [TBL B/Weigher](Pronumber,CargoCode,[B/weigher],Tonnes)
SELECT Pronumber,CargoRef,[B/Weigher],Tonnes
FROM [TBL Combined Board and Reg]