Create Trigger in SQL Server -
When I wanted to create a trigger using the pre-defined "CREATE TRIGGER" of SQL Server 2008 R2, then I lost. Can you please give me a statement directly to me that I can use to create a trigger, and tell me how before, before, and how to define all of this?
In addition, how can I renew / adapt / delete rows, and use my column values to work inside the trigger?
Database set-oriented and triggers are no different If a given task is executed a trigger will fire and That action can affect many rows. Thus, the question "code" is that I want to know the primary key for that line. is a misnomer, multiple rows can be inserted
SQL Server entered and
deleted
names, which represent the rows that are inserted or deleted by an action and are evenly structured to the table An Impact is Being Affected Theet trigger can populate both entered
and deleted
, whereas an insert trigger will only populate the table
From the comments:
But the decision of the email recipient will be made in the second table on the basis of a value, where the foreign key ID is located in the first table (which with a trigger
Answer this question to insert the to cycle through the rows Or use the table (which can again be several rows) and send an email. However, I recommend giving an email argument in a trigger, instead, in an archived mechanism I recommend putting that logic and sending my email to him.
For reference:
Comments
Post a Comment