LoslegenKostenlos loslegen

The TrackRetiredProducts trigger in action

Once you've created a trigger, it's always a good idea to see if it performs as expected.

The company's request for the trigger created earlier was based on a real need: they want to retire several products from their offering. This means you can check the trigger in action.

Diese Übung ist Teil des Kurses

Building and Optimizing Triggers in SQL Server

Kurs anzeigen

Anleitung zur Übung

Remove retired items from the Products table and check the output from the RetiredProducts table.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

-- Remove the products that will be retired
DELETE FROM ___
WHERE Product IN ('Cloudberry', 'Guava', 'Nance', 'Yuzu');

-- Verify the output of the history table
SELECT * FROM ___;
Code bearbeiten und ausführen