RE: OC4J Bind Variables: Positional Notation
From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Sat, 12 Jul 2008 11:28:27 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF0117E2B8@MSXVS04.trivadis.com>
Date: Sat, 12 Jul 2008 11:28:27 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF0117E2B8@MSXVS04.trivadis.com>
Hi Ray
> This is more like an ODBC or Perl query using positional placeholders.
> I had thought that the jdbc driver handled this and converted the
> former to the latter.
JDBC uses the "?" as placeholder to define a bind variable. Of course the JDBC driver is responsible to replace them. In your case the query sent to the database should be the following:
SELECT *
from table1
WHERE (col1 = :1 and col2 = :2);
As pointed out by Cary, if you want to see the query you should enable SQL trace.
HTH
Chris Antognini
Troubleshooting Oracle Performance, Apress 2008 (http://top.antognini.ch)
-- http://www.freelists.org/webpage/oracle-lReceived on Sat Jul 12 2008 - 04:28:27 CDT