Question: Introduction to SQL Server CREATE TRIGGER statement The statement allows you to create a new trigger that is fired automatically whenever an event such as

 Introduction to SQL Server CREATE TRIGGER statement The statement allows you

Introduction to SQL Server CREATE TRIGGER statement The statement allows you to create a new trigger that is fired automatically whenever an event such as , or occurs against a table. The following illustrates the syntax of the statement: CREATE TRIGGER [schema_name.]trigger_name ON table_name AFTER {[ INSERT], [UPDATE], [DELETE] } [NOT FOR REPLICATION] AS \{sql_statements In this syntax: - The is the name of the schema to which the new trigger belongs. The schema name is optional. - The is the user-defined name for the new trigger. - The is the table to which the trigger applies. - The event is listed in the clause. The event could be, or A single trigger can fire in response to one or more actions against the table. - The option instructs SQL Server not to fire the trigger when data modification is made as part of a replication process. - The is one or more Transact-SQL used to carry out actions once an event occurs. Q1) create a trigger that will track changes happening to the database (After inserting and after updating Salary)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!