Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to call store procedure in SQL*Plus

Re: How to call store procedure in SQL*Plus

From: Nick Grossman <nick_at_ulster.net>
Date: Wed, 28 Apr 1999 15:47:37 -0400
Message-ID: <372765D9.CA6ED39C@ulster.net>


> I have written a stored procedure in Oracle. [proc(abc in out varchar2)]
> The stored procedure will take the same parameter as in and out. However, how
> can i call the procedure in SQL*PLUS.
> I know that it should call below line
>
> var in_para char(100)
> execute proc(:in_para)
>
> But, how can i assign the value '123' to the in_para??? Just
> in_para:='123'???? Not work!!

Try

execute proc(123);

It will fill in the values you pass it, in order. So, if you have

PROCEDURE myproc (

	param1   IN NUMBER,
	param2   IN NUMBER,
	param3   IN NUMBER
	)

you can call it with

execute myproc(10,100,1000);

param1 will be 10,
param2 will be 100,
param3 will be 1000

Nick Grossman Received on Wed Apr 28 1999 - 14:47:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US