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 cursor and why it is required?
How do I partition a table in sql?
what is the difference between a having clause and a where clause? : Sql dba
which tcp/ip port does sql server run on? : Sql dba
what is “go” in t-sql? : Transact sql
What is bulk compiling in pl/sql.?
How to display the current date in sql?
What is sql*loader?
Can we use views in stored procedure?
Why triggers are used?
What are character functions?
What are inner outer left and right joins in sql?
What are reports usually used for?
What is procedure explain with example?
Explain aggregate functions are available there in sql?