JDBC: Get table names involved in a SQL query
问题 Is there any way to know the name of the tables involved in a SQL query executed via JDBC? For example: SELECT r.roleId FROM User u, UserRole r where r.userId = u.userId and u.name = "Jonh Smith" I don't want only the result set of this query but the actual table names ("User" and "Role"). I don't care about view names, but if there is no way to get the underlying table used in the view it's not a big problem, but this has to work with nested queries. As for why I need this information it's