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: Mark D Powell <mark.powell_at_eds.com>
Date: 13 Jun 2002 06:36:50 -0700
Message-ID: <178d2795.0206130536.6ae9a75b@posting.google.com>


jabailo_at_earthlink.net (john bailo) wrote in message news:<64fd0169.0206121404.30eec282_at_posting.google.com>...
> is the "?" a valid character in PL/SQL ?
>

Not usually. The is a variable substitution character in SQLPlus, which is normally the '&', but you can change it with the 'set define command'. When plsql is ran from sqlplus the ambersand variables are prompted for and the value substituted into the text string before SQLPlus processes them or passes them to the plsql engine.

> for instance, is this valid in oracle
>
> Select * from MyTable Where TableID = ?
>

Normally I would expect to see something like:  select * from MyTable where Tableid = '&variable'  varchar2 and char column datatypes values would be in sigle quotes while numbers do not need them

>
> 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 have no idea about this last item.

I hope this helps, but if this is not the case you might try posting the code along with information on the Oracle version.

Received on Thu Jun 13 2002 - 08:36:50 CDT

Original text of this message

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