title: SQL parser library for Java - Retrieve the list of table names present in a SQL statement
body: <p>I am looking for a SQL Library that will parse an SQL statement and return some sort of Object representation of the SQL statement. My main objective is actually to be able to parse the SQL statement and retrieve the list of table names present in the SQL statement (including subqueries, joins and unions).</p>
  
  <p>I am looking for a free library with a license business friendly (e.g. Apache license). I am looking for a library and not for an SQL Grammar. I do not want to build my own parser.</p>
  
  <p>The best I could find so far was <a href="http://jsqlparser.sourceforge.net/home.php" rel="noreferrer">JSQLParser</a>, and the <a href="http://jsqlparser.sourceforge.net/example.php" rel="noreferrer">example</a> they give is actually pretty close to what I am looking for. However it fails parsing too many good queries (DB2 Database) and I'm hoping to find a more reliable library.</p>