Can I get table name from
ResultSetMetaDataquery is join of multiple tables
example
select * from table1 , table 2
when I am going to try to retrieve table name from
ResultSetMetaDataI always founds empty value.
Note : I am using informix
driver
You should use it together with column number parameter, so try something like
String table1 = rs.getMetaData().getTableName(someColumnNumberFromFirstTable);
String table2 = rs.getMetaData().getTableName(someColumnNumberFromSecondTable);
Also see the docs.
Based on the Informix JDBC Guide, the driver is unable to retrieve the tablename if the query accesses more than one table and will return a single space instead:
From: Unsupported methods and methods that behave differently