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: help: Bind variables

Re: help: Bind variables

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Wed, 06 Oct 1999 10:42:25 -0400
Message-ID: <o177NyQlOTXkT=kzVAMSszGBVFy7@4ax.com>


On Wed, 06 Oct 1999 08:52:06 GMT, flap5_at_my-deja.com wrote:

>1. Can I use bind variables in normal SQL statements?
>
>2. If so, how can I declare the value of them?

Do you mean from sql*plus?

If yes then try this...

scott_at_8i> var e number
scott_at_8i> exec :e := 7788;
PL/SQL procedure successfully completed.

scott_at_8i> select ename from emp where empno = :e;

ENAME



SCOTT scott_at_8i> exec :e := 7839;
PL/SQL procedure successfully completed.

scott_at_8i> select ename from emp where empno = :e;

ENAME



KING Hope this helps.

chris.

>
>Thanks
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Oct 06 1999 - 09:42:25 CDT

Original text of this message

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