How to call the function and Procedure in trigger?
Answer Posted / pranabesh
Procedures can be called directly by name with parameters
[if any] in the trigger
ex:
suppose i have a procedure pro1(var1 in number, var2 in
number) which i want to call from trigger trig1
CREATE OR REPLACE TRIGGER TRIG1
AFTER UPDATE OF SAL ON EMP
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
L_VAR1 NUMBER;
...
...
BEGIN
...
...
-- CALLING THE PROCEDURE
pro1(10,20);
END
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the difference between alter trigger and drop trigger statements?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
explain the difference between bool, tinyint and bit. : Sql dba
How much ram can sql express use?
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
How do I start sql profiler?
Why do we create views in sql?
Is sql injection illegal?
What is the max nvarchar size?
What is error ora-01000: maximum open cursors exceeded
Which is faster union or join?
What is multiple partition?
What is the purpose of the sql select top clause?
What are records give examples?
Which is better trigger or stored procedure?