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: "?" in select statement

Re: "?" in select statement

From: Tim Cross <tcross_at_pobox.une.edu.au>
Date: 16 Jun 2002 16:27:07 +1000
Message-ID: <87it4j20xw.fsf@blind-bat.une.edu.au>


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

Original text of this message

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