I need to parse sql statements and get column names and table names. I tried with sample code. I got table names but I am stucked to get column names for each table.
Checkout Foundation Parser http://foundationdb.github.io/sql-parser/
Also note JSQLParser is no longer on SourceForge but maintain at https://github.com/JSQLParser/JSqlParser/wiki