Table name is available for SELECT query results from the ResultSetMetaData.getTableName method.
But there is no easy way (and no JDBC API method) to obtain a table name for an INSERT, UPDATE, or DELETE.
Prepending EXPLAIN or SHOW QUALIFIED to the SQL request may be the best way to get the information.
Table name is available for SELECT query results from the ResultSetMetaData.getTableName method.
But there is no easy way (and no JDBC API method) to obtain a table name for an INSERT, UPDATE, or DELETE.
Prepending EXPLAIN or SHOW QUALIFIED to the SQL request may be the best way to get the information.