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


Please Help Members By Posting Answers For Below Questions

Which is better varchar or nvarchar?

541


What is the difference between database trigger and stored procedure?

547


Does a primary key have to be a number?

513


What are the most important characteristics of pl/sql?

569


Is oracle sql free?

534






Explain character-manipulation functions?

621


What is the use of function "module procedure" in pl/sql?

659


Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

661


Do ddl statements need commit?

531


What is cursor explain with example?

546


What is type and rowtype in pl sql?

531


What is the difference between cross join and natural join?

556


What is a function in oracle pl sql?

532


What is substitution variable?

571


How to prepare for oracle pl sql certification?

564