Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

explain what is meant by the terms unitarism and pluralism

Answered: 1 week ago