My application has an interface where the user can write various SQL statements to perform certain tests on their database tables (MSSQL, DB2, Hive, and many others). I would like to know the tables and columns that are used in every SQL statement to understand what tables are covered by those tests.
- Is there a simple way to do this generically without using a parser? Only retrieving the tables and columns from any SQL.
- What open source parser library do you recommend that is .NET? I came across JSqlParser but couldn't find the equivalent for .NET
- If you have used ANTLR before, do you think it will be a lot of effort to find the grammars for the majority of the databases (ANTLR grammers for SQLs are few such as mysql, mssql, and few others.
Any help in solving this problem would be greatly appreciated.