Just FYI: ResultSetMetaData.getTableName(int col) is NOT implemented in ORACLE or many other JDBC’s for that matter. It seems Informix, I think, is the only one who actually implemented this function!!
Why would you need functionality this since you obviously performed the query in the first place so must have know which table(s) you were working with?
One, as in my case, you are writing a DB Admin tool and are dynamically displaying the returned Record Set and need to know which table was accessed to pass that to any other functions that need to alter that same table.
Two, you have performed a JOIN or nested SELECT and would like to know which table a particular item is associated with.
This function was just what I was looking for and would be useful if only it wasn’t a tease. Obviously the SUN JDK 1.4.1 people thought it was important to put in the spec and now we just need to get the DB developers to get on the boat.





