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
How to fetch alternate records from a table?
Is crud a cuss word?
What is implicit cursor in pl sql?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
how are mysql timestamps seen to a user? : Sql dba
What are few of the schema objects that are created using PL/SQL?
Can we have two clustered index on a table?
What is the use of sqldataadapter?
define sql update statement ? : Sql dba
how to enter characters as hex numbers? : Sql dba
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
What is a pdo connection?
Why are cursors used?
How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?