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.
Latihan ini adalah bagian dari kursus
Building and Optimizing Triggers in SQL Server
Petunjuk latihan
- Create a new trigger,
PreventProductChanges, that prevents any updates to theProductstable.
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
-- 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);