Re: JDBC Question: Getting data from tables with columns that have the same name



Hi. Most JDBC drivers aren't told by the DBMS what table name
is associated with a data column, so the JDBC driver won't be
able to distinguish. A column may come from 0, 1, or more
tables.
The only two options you have are to get them by index,
or altering the SQL to assign unique aliases to each column.

Joe Weinstein at BEA Systems

.



Relevant Pages

  • Re: PreparedStatement#setString on int columns
    ... I can only say that of the JDBC drivers we've made or seen used, ... DBMS via setString(), and never saw a DBMS that didn't convert string ... didn't do the implicit conversion. ...
    (comp.lang.java.databases)
  • Re: Detecting if a table in a database already exists ?
    ... On 13.10.2004 12:56 Robert Klemme wrote: ... > Just let me add that it doesn't work for all JDBC drivers (at least not ... FirebirdSQL, HSQLDB, Cloudscape, DB2, FirstSQL, ThinkSQL) and it works on all of ... rare JDBC functions where I have not built in any DBMS specific stuff so far. ...
    (comp.lang.java.databases)
  • Re: Where can I obtain a Complete JDBC URL list?
    ... Here's a catalog of dozens of JDBC drivers (with contact information ... and links to web sites): ... Prev by Date: ...
    (comp.lang.java.databases)