1. Learn
  2. /
  3. Courses
  4. /
  5. Building and Optimizing Triggers in SQL Server

Connected

Exercise

Preventing table deletion

Fresh Fruit Delivery wants to prevent its regular employees from deleting tables from the database.

Instructions

100 XP
  • Create a new trigger, PreventTableDeletion, to prevent table deletion.
  • The trigger should roll back the firing statement, so the deletion does not happen.