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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Prepared statement vs Exec sql insert/update/select

Re: Prepared statement vs Exec sql insert/update/select

From: Lisa Spielman <lisa.spielman_at_compaq.com>
Date: Mon, 13 Sep 1999 11:18:05 -0400
Message-ID: <7rj4gu$73a$1@mailint03.im.hou.compaq.com>


Thanks for your quick response!

We do use use host variables in every statement, though we do have a few like:

exec sql insert into t ( col1, col2, col3, ... ) values ( :b1, SYSDATE, :b2, ...)

Would I be better off preparing a statement like this?

For a statement where there are the same default values:

   insert into t ( c1,c2,c3,c4,c5,c6 ) values ( 0, :b1, :b2, 0, :b3, :b4 )

is it better to use a host variable and substitute it for the 0's ? b0 = 0; values ( :b0, :b1, :b2, :b3, :b4 )

All of our inserts/updates explicitly have the columns listed

   Lisa Received on Mon Sep 13 1999 - 10:18:05 CDT

Original text of this message

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