Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "?" in select statement
mark.powell_at_eds.com (Mark D Powell) writes:
> > how about in jdbc, java.sql?
> >
> > i see it used in a java class file, but i cant understand how it could work
> > for ms/sql
>
I think jdbc (and certainly Perl's DBI) allow you to use the ? for
parameter variables. Essentially, you can create an SQL statement
which uses the ? which you pass to some sort of "prepare statement"
procedure in the driver. This usually returns some sort of "statement
handler" which you then execute, passing some variables as parameters
which replace the ? before the statement is passed to the db
server. The idea is that if you have a statement which is going to be
executed many times and it only differs in a few parameters, you can
get better performance because the driver can prepare the statemnt for
passing to the server just once and reduce some of the pre-processing
overhead.
Tim Received on Sun Jun 16 2002 - 01:27:07 CDT