Preventing changes to Products
The Fresh Fruit Delivery company doesn't want regular users to be able to change product information or the actual stock.
この演習はコースの一部です
Building and Optimizing Triggers in SQL Server
演習の手順
- Create a new trigger,
PreventProductChanges, that prevents any updates to theProductstable.
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
-- Prevent any product changes
CREATE TRIGGER ___
ON ___
___ ___ UPDATE
AS
RAISERROR ('Updates of products are not permitted. Contact the database administrator if a change is needed.', 16, 1);