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: Q: How to use bind variables in stored procedures, packages, etc.

Re: Q: How to use bind variables in stored procedures, packages, etc.

From: <mgogala_at_rocketmail.com>
Date: Tue, 22 Dec 1998 01:07:32 GMT
Message-ID: <75mrcj$5ju$1@nnrp1.dejanews.com>


In article <75mj4h$u9q$1_at_nnrp1.dejanews.com>,   ptsurmr_at_my-dejanews.com wrote:
> Quick (and hopefully simple) question:
>
> How do you declare/use bind variables in stored (server side) plsql
> packages, functions, procedures, etc.?
>
> In sqlplus I can do something like (trivial example):
>
> variable n number
> begin
> select max(key) into :n from xxx;
> dbms_output.put_line('Number = ' || :n);
> end;
> /
>
> where table xxx created as...
> create table xxx (
> key number primary key);
>
> insert into xxx (key) values (1);
> insert into xxx (key) values (2);
> insert into xxx (key) values (3);
>
> How to do the same with a procedure (function, package, etc)?
>
> Thank you,
> John
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

You should take a look at DBMS_SQL package which is described in Oracle Application Developers Guide

--
Mladen Gogala

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Dec 21 1998 - 19:07:32 CST

Original text of this message

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