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 test procedure that has OUT params in SQLPlus?

Re: How to test procedure that has OUT params in SQLPlus?

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 21 Jun 2005 07:27:59 -0700
Message-ID: <1119364079.439364.207130@g49g2000cwa.googlegroups.com>

ohaya wrote:
> Hi,
>
> I have created a procedure called decrypt_inmemory with following
> parameters:
>
> key IN varchar2, data IN varchar2, cleardata OUT varchar2
>
> I was wondering how I can test execute this procedure from within
> SQLPlus?
>
> How do I create a variable to receive the OUT parameter? And, how do I
> display this variable after I test-execute the procedure?
>
> Thanks,
> Jim

set serverout on -- Use this to enable dbms_output declare

   your_out_var datatype; -- This is OUT variable datatype begin

   your_proc(...,...,your_out_var);
   dbms_output.put_line(your_out_var); -- This prints the result on the screen
end;
/

It's all documented at http://tahiti.oracle.com

Regards
/Rauf Received on Tue Jun 21 2005 - 09:27:59 CDT

Original text of this message

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