What are Triggers?
Answers were Sorted based on User's Feedback
Answer / prima krishnan,escubetechnolog
Triggers are user-written programs that are associated with
database tables. You can define a trigger for update,
delete, and insert operations. Whenever the operation takes
place, regardless of the interface that is changing the
data, the trigger program is automatically activated by DB2
database and executes its logic. In this way, complex rules
can be implemented at the database level, totally
independent from the application layer......
| Is This Answer Correct ? | 14 Yes | 2 No |
Answer / newbiezhang
trigger is a approach to catch the Data before or after the
Data manipulation performed. we can use triggers to valid
data, save the data change log, or do other manipulation
base on our business logic.
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / sujanindian
Triggers is a self contained set of transact executable
statements which can be invoked during the operations such as
insert,update,delete can be performed in a database file.
We can able to add trigger in a physical file :
ADDPFTRG
to remove a trigger : RMVPFTRG
In the case of SQL/400 we can create trigger by ....
>>STRSQL
>>CREATE TRIGGER TRG_Name
after INSERT/DELETE/UPDATE On PF1
Insert Into PF2 Values ('RECORDS DELETED IN PF1')
>>Delete FROM PF1 Where Recordno = 10
>>SElect * FROM PF2.
In the above code, the records in the PF1 is deleted , at
once the trigger trg_name is fired and the given insert
statement is activated in pf2.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / mithun
Triggers are user programs that are called when an operation
(Insert,update,delete)occured in a database table. By the
ADDPFTRG command in CL we attached a database pf with the
trigger program.Whenever this PF is changed, the trigger
program is call.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / ravi shankar porwal
Trigger are events that are fired automatically whenever
there are any changes made to the database file.The actions
that may cause of firing the events are - insert, update or
delete operations on database files.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / yogesh
Trigger is an automatic action of databse which invoke a
program to perform based on perticular event at perticular
time
There are six type of triggers:
Insert + Before
Insert + After
Update + Before
Update + After
Delete + Before
Delete + After
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / shipra jain
a trigger is automatically executed without any action required by the user .
a trigger defines an action the database should take when some database related event occurs.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / bala
Triggers are special kind of stored procedures that get
executed automatically when an INSERT, UPDATE or DELETE
operation takes place on a table.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sonam
Trigger Fire when any event occur with a particular application.
| Is This Answer Correct ? | 1 Yes | 0 No |
1.What is the difference between regular join logical file and non join logical file? 2.what are the nessasary keywords for non join logical file
how do you pass parameters in cl?
What is a Join Logical File, Can it be used for Update ?
what is the purpose of data structure?
define the purpose/use for sflrna?
Can level check error occur if we do chgpf?
is there any way I can ease my rpg controls on numeric input fields? How about an input date field?
List and explain the different type of data structures?
What is the difference between keys of a Physical file and the keys of a logical file?
2 Answers Bank Of America, BoA,
1) Can we declare a Display file in CL? 2) How many no. of files can be declared in a CL? 3) What is Non-Join Logical file and its importance?
what are necessary keywords to code message subfile?
If i change any file through application after entering data , how to check which file is updated through applications . For call stack we takes esc 3 then we chose 11..But What is answer of below qtn..?