RelationalDBDesign
SiteMap
Business Rules
Cursors Views
Database Creation
SQL Monitoring
Database Web Apps
Data Manipulation
Access Features
Building Access DB
SQL-Server Triggers
«Prev
Next»
Business Rules
Transaction Locking
Define Transactions
Three Transactions Modes
Define Isolation Levels
Identify Nested Transactions
Transaction Isolation - Quiz
Optimistic Pessimistic Locking
Deadlock Transaction Blocking
Avoid Server Deadlocks
Commit Rollback Transaction
Manage Distributed Tx
Error Handling Testing
Transaction Locking Conclusion
Server Interaction
Assign Use Variables
SQL Server Functions
SQL Function Statements
Date Time Functions
Reporting Errors
SQL Raising Errors
Programming Concepts Conclusion
SQL-Server Triggers
Trigger SQL Server Utility
Three Trigger Types
Enforcing Business Rules
Creating SQL Triggers
Practice Creating Triggers
Creating Triggers - Exercise
Implementing SQL-Server-Triggers
Modifying Triggers
Deleting SQL-Server Triggers
Testing SQL-Server Trigger
SQL Trigger Conclusion
SQL Triggers-Quiz
Stored Procedures
What is SP
Enforcing Business Rules
Creating SP
User Defined SP
Stored Procedures - Exercise
Modifying Procedures
Deleting Stored Procedures
System Extended SP
Error Handling
Using Output Parameters
Executing Stored Procedures
Testing Stored Procedures
Different SP Conclusion
Stored Procedure - Quiz
Accessing Remote Data
Enterprise Manager Server
Adding Remote Login
Modifying Triggers in SQL-Server - Exercise
Objective:
Practice modifying a trigger.
Exercise Scoring
This exercise is worth a total of 10 points. You will receive 10 points for accurately modifying the Transact-SQL statement that modifies a trigger, as described in the instructions.
Instructions
Consider the trigger that you constructed in the previous exercise. To remind you, the instructions were to 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. In this exercise, alter that trigger so that it applies to updates as well as deletes. Also, change the message to something more appropriate for both updating and deleting.
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.