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
I need to insert a record in a file using STRSQL containing the some field values same as an already existing record in that file.I know to smple insert mentioning those values one by one.But is there any another query can be prepared for the same .Please share the query if known to you. Thanks in advance.
name few ibm supplied libraries?
what is rpg ?
How can we update a specific field in RPG?
What is binder language ?
explain the difference between defining subfile and message-subfile?
What are the record format field mapping options in cpyf?
what is the difference between normal upddta to pf and updating using dfu program?
how many printer files can be defined in f specs ?
distinguish between terminating a program through seton lr and return?
how do you read data area in an rpg program?
In 'o' Specs What Is The Opcode For Write?
Hi,Please give me the the answer for these quesitons? 1.what is IFS and ICF and RAPE amd DISKET fils? explain with example please? 2.What is the difference between POST AND SPACE OPCODES? 3.Can anybody tell me default printerfile command and object type?
what if my system I runs with system value qccsid 65535?
how do you specify the number of records to roll in a subfile ?