Home » SQL & PL/SQL » SQL & PL/SQL » execution of procedure
execution of procedure [message #222171] Fri, 02 March 2007 03:01 Go to next message
donind
Messages: 95
Registered: February 2007
Member
Hi,

How to execute a procedure which is having out parameter

ex: create or replace procedure proc( a in int, b out int) as
.........................


exec proc(10,?);

Thanks in adv
Re: execution of procedure [message #222174 is a reply to message #222171] Fri, 02 March 2007 03:04 Go to previous messageGo to next message
friendarora
Messages: 24
Registered: February 2007
Junior Member

SQL> variable b number
SQL> begin
proc(10,b);
end;

SQL> print b;
Re: execution of procedure [message #222234 is a reply to message #222174] Fri, 02 March 2007 07:21 Go to previous messageGo to next message
anilsinare
Messages: 22
Registered: December 2005
Location: ipswich, uk
Junior Member
Alternate way -

Declare
b number;
Begin
proc(10,b);
Dbms_Output.Put_Line('Out Value -'||b);
End;
Re: execution of procedure [message #222340 is a reply to message #222171] Sat, 03 March 2007 00:13 Go to previous message
suneethakolipakula
Messages: 1
Registered: March 2007
Location: NewYork
Junior Member
SQL>variable p number
SQL>execute proc(: p);
SQL>print p;

host variables in plsql statements should be reffered with :

[Updated on: Sat, 03 March 2007 00:16]

Report message to a moderator

Previous Topic: help me for a table with lob datatype
Next Topic: PK and FK one one column
Goto Forum:
  


Current Time: Sat Dec 10 22:37:59 CST 2016

Total time taken to generate the page: 0.22158 seconds