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 -> How to use bind variable

How to use bind variable

From: max <oracle_rep_spum_at_libero.it>
Date: Mon, 19 Mar 2001 00:24:31 GMT
Message-ID: <3ab54fee.1192527@news.libero.it>

Hi,
i read that using bind variables speed application up cause reduce parsing.
I tried to use bind variable in a stored procedure but i could not.

Take for instance,

CREATE OR REPLACE upd_sal (empno number) as

 :b_empno NUMBER;

BEGIN

	:b_empno:= empno;
	UPDATE emp SET sal = (sal +1)
	WHERE  empno= :b_empno;

END;
/

NO WAY, it doesn't work. The compilation produces errors. How and where must I declare the bind variable??? Tia
Massimiliano          Received on Sun Mar 18 2001 - 18:24:31 CST

Original text of this message

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