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
Why having clause is used in sql?
What is cursor and why it is required?
What is the meaning of disabling a trigger?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
What is ttitle and btitle?
How can we avoid duplicating records in a query?
how to get a list of columns in an existing table? : Sql dba
How do you sort in sql?
What are the types of functions in sql?
What does an inner join do?
Enlist some predefined exceptions?
What is sqlexception in java?
what is the different between now() and current_date()? : Sql dba
What is procedure and function in sql?
What is a composite primary key?