Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can a select statement fire a trigger?

1205


How do I run a sql script?

1223


what is the difference between undefined value and null value? : Sql dba

1139


Can we create view in stored procedure?

1021


what is error ora-03113: end-of-file on communication channel?

1224


How is indexing done in search engines?

1021


Is microsoft sql free?

1138


Why cannot I use bind variables in ddl/scl statements in dynamic sql?

1258


What programs use sql?

1084


What is implicit cursor in pl sql?

1144


Explain the difference between triggers and constraints?

1022


What is difference between sql and mysql?

1185


Mention what are different methods to trace the pl/sql code?

1292


Do we need commit after truncate?

1134


How do I view a procedure in sql?

1017