Can I get a table name from a join select resultset metadata
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-05-06T03:16:49Z
Indexed on
2010/05/06
3:18 UTC
Read the original article
Hit count: 274
Below is my code trying to retrieve table name form Resultset
ResultSet rs = stmt.executeQuery("select * from product");
ResultSetMetaData meta = rs.getMetaData();
int count = meta.getColumnCount();
for (int i=0; i<count; i++) {
System.out.println(meta.getTableName(i));
}
But it returns empty, no mention it is a join select resultset. Is there any other approaches to retrieve table name from reusltset metadata?
© Stack Overflow or respective owner