Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to call ResultSet.getString() with table_name.column_name?

843854Sep 28 2004 — edited Sep 28 2004
I have a ResultSet containing columns from different tables that share the same name. In the SQL select statement I refer to them as "table1.column" and "table2.column" and I try to do the same by calling <code>resultSet.getString("table1.column"</code> but I got the "column not found error". The ResultSetMetaData revealed JDBC regard these two columns simply as "column" without the table prefix. Is there some way to get around this? I really want to avoid using getString with column index because it makes the code difficult to read.

TIA,
Eric
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2004
Added on Sep 28 2004
6 comments
1,351 views