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.
Questo esercizio fa parte del corso
Building and Optimizing Triggers in SQL Server
Istruzioni dell'esercizio
- Create a new trigger,
PreventProductChanges, that prevents any updates to theProductstable.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
-- 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);