How to call ResultSet.getString() with table_name.column_name?
843854Sep 28 2004 — edited Sep 28 2004I 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