阅读背景:

在sql server中插入/更新触发器以检查值

来源:互联网 

I'm new to SQL Server and triggers. I have an existing trigger i need to customise. There are two tables Products (which contains the total amount of products in the stock. Quantity) and OrdersLines (which contains all information about orders. an example row would would have OrderID, ProductID and Amount in it) When I make an order product amount is reserved. I need the trigger to to check if new ordered amount doesnt go above the Quantity. If it does, throw RAISERROR, if not, let the transaction continue. I'm new to SQL Server and triggers. I have an e




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: