ComenzarEmpieza gratis

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.

Este ejercicio forma parte del curso

Building and Optimizing Triggers in SQL Server

Ver curso

Instrucciones del ejercicio

  • Create a new trigger, PreventProductChanges, that prevents any updates to the Products table.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

-- 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);
Editar y ejecutar código