SQLConfiguration
SQLConfiguration
SiteMap
Database Creation
Cursors Views
Business Rules
SQL-Server Triggers
«Prev
Next»
Business Rules
Transaction Locking
Transaction Isolation - Quiz
Error Handling Testing
Server Interaction
Assign Use Variables
SQL Raising Errors
SQL Server Functions
SQL-Server Triggers
SQL Triggers-Quiz
Enforcing Business Rules
Creating Triggers - Exercise
Testing SQLserver Trigger
Stored Procedures
Stored Procedures - Exercise
Stored Procedure - Quiz
Modifying Procedures
Error Handling
Accessing Remote Data
Enterprise Manager Server
Adding Remote Login
Creating SQL Triggers - Exercise
Creating Triggers Exercise in SQL Server 2016
Objective:
Practice creating a trigger.
Exercise scoring
This exercise is worth a total of 20 points.
You will receive 20 points for accurately creating the Transact-SQL statement that creates a trigger, described in the instructions.
Instructions
Construct a trigger, named
trgDelete
, that is affected only by
DELETE
Transact-SQL statements in the Sales table. This trigger should simply raise an error that indicates that data cannot be deleted from this table.
Submitting the exercise
Type or paste your Transact-SQL statement into the text box below, then click
Submit
to submit it and view a results page.
Submit