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
Can a select statement fire a trigger?
How do I run a sql script?
what is the difference between undefined value and null value? : Sql dba
Can we create view in stored procedure?
what is error ora-03113: end-of-file on communication channel?
How is indexing done in search engines?
Is microsoft sql free?
Why cannot I use bind variables in ddl/scl statements in dynamic sql?
What programs use sql?
What is implicit cursor in pl sql?
Explain the difference between triggers and constraints?
What is difference between sql and mysql?
Mention what are different methods to trace the pl/sql code?
Do we need commit after truncate?
How do I view a procedure in sql?