我正在使用Sql Server 2008
. 我有一个Trigger
更新我的另外两个表。我已经阅读了 Stack over flow 这个链接在此处输入链接描述,但它并不能完全满足我的需求。下面是我的Trigger
ALTER TRIGGER [Inventory].[StockUpdationOnIssue]
ON [Inventory].[StockIssueDetails]
AFTER INSERT
AS
BEGIN
BEGIN TRY
BEGIN TRAN
INSERT INTO TableA
(col1, col2,col3
)
SELECT I.col1,I.col2,si.col3
FROM inserted I
INNER JOIN Inventory.StockIssue SI
ON SI.StockIssueId = I.StockIssueId
INSERT INTO TableB
(col1, col2,col3
)
SELECT I.col1,I.col2,si.col3
FROM inserted I
INNER JOIN Inventory.StockIssue SI
ON SI.StockIssueId = I.StockIssueId
COMMIT TRAN
END TRY
BEGIN CATCH
SELECT ERROR_MESSAGE();
RollBack Tran;
END CATCH
END
下面的错误显示给我......