Collections:
"ALTER TRIGGER" - Modifying Existing Triggers in SQL Server
How To Modify Existing Triggers using "ALTER TRIGGER" in SQL Server?
✍: FYIcenter.com
If you want to make changes to an existing trigger, you could use the "ALTER TRIGGER" statements to refine the trigger again. The tutorial exercise below shows you how to modify the trigger defined in a previous tutorial:
USE FyiCenterData; GO ALTER TRIGGER dml_message ON fyi_users AFTER INSERT, UPDATE, DELETE AS PRINT 'Time: '+CONVERT(VARCHAR(12),GETDATE()); PRINT 'Records are inserted, updated,' + ' or deleted in fyi_users'; GO UPDATE fyi_users SET email='john@fyicenter' WHERE id = 1; GO Time: Jul 1 2007 Records are inserted, updated, or deleted in fyi_users
An extra printing statement is added the trigger.
⇒ "DROP TRIGGER" - Deleting Existing Triggers in SQL Server
⇐ sys.triggers - Listing All Triggers in the Database in SQL Server
2016-10-24, 1343🔥, 0💬
Popular Posts:
What Are Out-of-Range Errors with DATETIME values in SQL Server Transact-SQL? When you enter DATETIM...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How To Create a Table Index in Oracle? If you have a table with a lots of rows, and you know that on...
How To Convert a Unicode Strings to Non-Unicode Strings in SQL Server Transact-SQL? Since Unicode ch...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...