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.
Bu egzersiz
Building and Optimizing Triggers in SQL Server
kursunun bir parçasıdırEgzersiz talimatları
- Create a new trigger,
PreventProductChanges, that prevents any updates to theProductstable.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
-- 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);