TOTAMT NUMBER(6,2) the log will be written. SQL> @ trigger1
/ This program is called use_trigger1
27-JUL-99 160 / and posted the 160 to total_notes using its insert.
27-JUL-99 195 In this example I am running the update program again and it is causing the trigger to fire and putting a new total in the total_notes that the trigger writes to. Note that 23456 used to have 10 in it. It has been updated to 45 which is an increase of 45.
/ will happen. SET SERVEROUTPUT OFF the insert is done - note that it only gets fired in the classlev is not SENIOR new.classlev is the new classlev that is going to be inserted. SENIOR 91 999
1234 John Doe 15 FRESHMAN This works successfully - 15 is within the range for freshman so the insert done by the program is successful.
1234 John Doe 15 FRESHMAN 15 is not in the range for a junior so the record is not inserted.
SENIOR 91 999 1234 John Doe 15 FRESHMAN Note that checking is not done on a SENIOR so the insert happens even though the range is incorrect.