BaşlayınÜcretsiz Başlayın

Preventing changes to orders

Fresh Fruit Delivery needs to prevent changes from being made to the Orders table.

Any attempt to do so should not be permitted and an error should be shown instead.

Bu egzersiz

Building and Optimizing Triggers in SQL Server

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a new trigger on the Orders table.
  • Set the trigger to prevent updates and return an error message instead.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Create the trigger
___ ___ PreventOrdersUpdate
ON ___
___ ___ UPDATE
AS
	RAISERROR ('Updates on "Orders" table are not permitted.
                Place a new order to add new products.', 16, 1);
Kodu Düzenle ve Çalıştır