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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Anyone seen ROWID's added to the SELECT clause of a statement?

RE: Anyone seen ROWID's added to the SELECT clause of a statement?

From: Sheehan, Heath <heath.sheehan_at_intergraph.com>
Date: Fri, 16 Mar 2007 07:09:52 -0600
Message-ID: <ED3B795A56D8C64EAFF6B7042273D4240210ECE2@US-MAIL.ingrnet.com>


That most likely is the ODBC driver adjusting the select statement to try to make sure that a primary key field is selected. The driver will do this if the recordset is opened as being updateable. Some (all?) ODBC drivers for Oracle will use ROWID to uniquely identify each selected row if it is unable to determine a primary key for the table (or may do this for all updateable selects, I cannot remember exactly). Once they know a key for the table, then they can easily construct the updates when the records change and this is why they add the ROWID column to the SELECT.

Regards,

Heath

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Robert Freeman Sent: Thursday, March 15, 2007 7:26 PM
To: Oracle-L_at_freelists.org
Subject: Anyone seen ROWID's added to the SELECT clause of a statement?

I have an application that everyone swears no changes have occured on, that is adding a ROWID clause to the end of the select clause of each SQL statement.

The application code does not appear to be doing this. It runs through ODBC. The database does not appear to be doing this.

Has anyone seen anything like this before?

Robert

Robert G. Freeman
Author:
Portable DBA: Oracle (Oracle Press)
Oracle Database 10g New Features (Oracle Press) Oracle9i RMAN Backup and Recovery (Oracle Press) Oracle9i New Features (Oracle Press) Oracle Replication (Rampant Tech Press) Mastering Oracle8i (Sybex) Oracle8 to 8i Upgrade Exam Cram (Coriolis <RIP>) Oracle 7.3 to 8 Upgrade Exam Cram (Coriolis <RIP>)
--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Fri Mar 16 2007 - 08:09:52 CDT

Original text of this message

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