At 10:34 AM 1/14/2003, Ron Rogers wrote:
List,
We use TOAD as one of our database tools and I was viewing some of the
SQL statements that were processed and I can't explain the "why" the
statement is the way it is.
The developer wrote "Select to_char(sysdate,'mm-dd-yyyy') from dual;"
in a VB application.
We use the Oracle and MS ODBC drivers to connect to the database.
What I saw as the SQL statement: "select
ROWID,to_char(sysdate,'mm-dd-yyyy') from dual where ROWID = :v1"
Where did the select ROWID come from?
In other statements where the select written is "Select table.* ..." I
see "Select table.ROWID, table.*..." Again, where does the ROWID come
from?
Is it a VB,/+ODBC thing that I should not be concerned with?
The ROWID parameter is used by the Oracle ODBC driver (and I assume
everyone else's ODBC & OLE DB drivers for Oracle) whenever the driver needs
to provide functionality like scrolling a resultset (jump to row 1.000.000
without going through the other 999.999) or to update the data in the
resultset. In these cases, the driver know that the ROWID will uniquely
identify the row, so it just has to remember the set of ROWID's and it can
call up any row. Similarly, if it needs to update a row, it can put a
'where ROWID=' clause in the update statement to ensure that only one row
gets updated.
Any links to the info would be helpfull in understanding the query.
Thanks,
Ron
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Ron Rogers
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Justin Cave
Distributed Database Consulting
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Justin Cave
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).