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

What is trigger types of trigger?

548


How do I make my sql query run faster?

465


How to use sql*plus built-in timers?

574


How to run sql*plus commands in sql developer?

586


Which join condition can be specified using on clause?

512






How do you break a loop in pl sql?

519


What are the two types of exceptions in pl/sql?

541


Does a join table need a primary key?

530


What is the command used to fetch first 5 characters of the string?

878


Which kind of parameters cannot have a default value in pl sql?

593


Explain what is a subquery ?

653


is mysql query is case sensitive? : Sql dba

558


What information is needed to connect sql*plus an oracle server?

583


how can we destroy the session, how can we unset the variable of a session? : Sql dba

543


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

644