answersLogoWhite

0

What are triggers?

Updated: 12/14/2022
User Avatar

Wiki User

6y ago

Best Answer

Triggers are an action that is performed is a condition is met within the code. In this example, "TRIG56" will perform this action: After a row is inserted into TABLEZZZ, if the row is <=50 then

insert the same row into TABLEYYY. If the condition/value is not

met, the row will not be inserted.

You can do a "BEFORE" trigger also. Triggers are code that must be compiled. You can also "disable" a trigger if you are doing an import into the tables for faster insertion. However, the inserts will have to be done into both tables because TABLEYYY will not be populated from the trigger because it is disabled. CREATE TRIGGER trig56 AFTER INSERT ON tableZZZ REFERENCING NEW AS insertedRow FOR EACH ROW WHEN (insertedRow.a <= 50) BEGIN INSERT INTO tableYYY VALUES(:insertedRow.b, :insertedRow.a); END trig56; . run;
Trigger is a statement that excute automatically as a side effect of modification to the database.
A trigger is defined for and connected to a RDBMS table. A trigger can be defined to do a particular job (typically insert audit records in another table or perform some validations) whenever the original table (on which the trigger is created) is selected or inserted, updated or deleted. A trigger is used to ensure that certain jobs are automatically done when a predefined event occurs. Both the event and the resultant action typically happen within the database.

A trigger is a set of statements that gets executed implicitly or automatically whenever any one of the following operation takes place on the table for which trigger has been created :

1. Inserting record(s) to the table

2. Deleting record(s) from the table

3. Updating the table

The operation on which trigger gets executed and the work performed at that time depends on the statements written in the trigger.

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are triggers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the fastest method to place total of a column in a cell?

Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.Use the Autosum feature, which triggers the SUM function.


Who is Victoria triggers?

Victoria triggers is a Youtube Star.


What node triggers and impulse?

The sinoatrial node triggers an impulse


What condition triggers erythropoiesis?

Hypoxia in the blood triggers erythropoiesis.


What triggers trees to lose chlorophyll?

The winter triggers trees to lose chlorophyll


On penguin storm what are triggers?

if you stop triggers you cant go any where the doors are stopped


How do you make triggers in age of mythology?

Well, you make triggers by going to the top menu and selecting "triggers" then you go add trigger then add effect then choose your effect!


Can a spyder victor 2012 have rocking triggers?

Yes there are rocking triggers that fit the victor. However it is not really worth upgrading, no do rocking triggers on mechanical guns have effective firepower.


What are advantages and disadvantages of triggers in computer science programming?

Advantages of triggers triggers can be used to enforce constraint triggers are automatic, they are activated immediately after any modification is done to the database table enhance performance enforce and execute business rules Follow me on twitter @Bennypah


What triggers the rising prices of gas and fuel your thoughts?

What triggers the rising prices of gas and fuel, your thoughts


What triggers a snake to strike?

you


What triggers endocytosis?

bananas