我是触发器的新手,我有两个名为 ArefSms 和 tblSalesProd 的表
我想在插入我的触发器更新 ArefSms 后,tblSalesProd.SalesID=ArefSms.SalesID 为此建议我写下面的代码
USE [ACEDB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[areftblSalesProd] ON [dbo].[tblSalesProd]
AFTER INSERT
AS
Begin Try
Update ArefSms
set
qt=inserted.ProdQty
where ArefSms.SalesID=inserted.SalesID
End Try
Begin Catch
End catch
但现在我有错误
Msg 4104, Level 16, State 1, Procedure areftblSalesProd, Line 9
The multi-part identifier "inserted.SalesID" could not be bound.
我能做些什么?