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 the difference between alter trigger and drop trigger statements?

1042


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1176


explain the difference between bool, tinyint and bit. : Sql dba

937


How much ram can sql express use?

930


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

1142


How do I start sql profiler?

941


Why do we create views in sql?

1054


Is sql injection illegal?

963


What is the max nvarchar size?

897


What is error ora-01000: maximum open cursors exceeded

1061


Which is faster union or join?

902


What is multiple partition?

920


What is the purpose of the sql select top clause?

1019


What are records give examples?

953


Which is better trigger or stored procedure?

880