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?

Answers were Sorted based on User's Feedback



How to call the function and Procedure in trigger?..

Answer / rakesh keshu

With the help of call statement..without semicolon

create or replace trigger tri_call


begin
call p1()



end tri_call;

Is This Answer Correct ?    12 Yes 0 No

How to call the function and Procedure in trigger?..

Answer / 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

How to call the function and Procedure in trigger?..

Answer / pradeep aryan

hi this is Sql server Statement:

Create table findSalary(salay int)

-- create procedure
Create proc stp_testdata
as
begin
select * from findsalary
end
-- Create function
create function Function4()
returns varchar
as
begin
return 'test data'
end
-- insert command
insert into findsalary values (89)


this is working fine

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

What is difference between cursor and ref cursor?

1 Answers  


Why use triggers in sql?

0 Answers  


What is pl sql commands?

0 Answers  


Can we use distinct and group by together?

0 Answers  


What is difference between joins and union?

0 Answers  


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

0 Answers  


----> There is a table T with two columns C1 and C2. The data is as below: C1 C2 1 4 2 5 3 6

4 Answers   ICICI,


What is compiled query?

0 Answers  


Explain alias in sql?

0 Answers  


Explain UNION,MINUS,UNION ALL, INTERSECT?

1 Answers  


Does sql*plus also have a pl/sql engine?

0 Answers  


Is it possible to sort a column using a column alias?

0 Answers  


Categories