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, 1807🔥, 0💬
Popular Posts:
How To Drop a Stored Procedure in Oracle? If there is an existing stored procedure and you don't wan...
How To Connect the Oracle Server as SYSDBA in Oracle? This is Step 4. The best way to connect to the...
What Is a Dynamic Performance View in Oracle? Oracle contains a set of underlying views that are mai...
Where to find reference information and tutorials on MySQL database functions? I want to know how to...
What Are the Differences between DATE and TIMESTAMP in Oracle? The main differences between DATE and...