What are Triggers?
Answer Posted / 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 |
Post New Answer View All Answers
What is file access opcodes?
What are the types of data structure in as400?
how to write *pssr ?
when should I use method get, and when should I use method post in my cgis?
what are indicators?
what does check opcode do ?
where can you specify an indicator in lokup operation?
what is message subfile?
how many files can be defined in f specs?
how do you specify page overflow indicator for printer files in rpg?
what are the different types of data areas?
what is service program?
how does union file maintains record formats?
is it there an easy way to determine if an html section is available to issue a wrtsection upon?
What Does Lokup Does In Tables & Arrays?