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

What is cursor and why it is required?

1176


How do I partition a table in sql?

1114


what is the difference between a having clause and a where clause? : Sql dba

1071


which tcp/ip port does sql server run on? : Sql dba

1017


what is “go” in t-sql? : Transact sql

1096


What is bulk compiling in pl/sql.?

1121


How to display the current date in sql?

1065


What is sql*loader?

1167


Can we use views in stored procedure?

1028


Why triggers are used?

980


What are character functions?

1079


What are inner outer left and right joins in sql?

1006


What are reports usually used for?

1017


What is procedure explain with example?

947


Explain aggregate functions are available there in sql?

996