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 are the three types of keywords associated with printer file ?
define a output queue?
list some of the commonly used commands for debugging?
what is *iso date format?
what is rpg ?
In AS/400 projects in Companies whats the meaning of production support team.what production support involves.also what work does development,maintenance involve what are the other teams or processes that are available for as400 project.
how many files, printer files you can describe in a rpg?
Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)
how can I control the way a remote browser uses its cache?
what the purpose of ovrdta, ovrata keywords?
how do u compile rpgle program?
Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?
what is elastic and non elastic subrile?
is there any way I can ease my rpg controls on numeric input fields? How about an input date field?
what are members?