SQL Parser How-To

Read SQL text, and it will be tokenlized by lexer into list of tokens. This list of source tokens will be used as the input of the yacc parser.

Yacc parser reads source token in SourceTokenList, based on the syntax of different databases SQL dialect, the parser will create a query parse tree if no syntax error was found. Otherwise, syntax error will be detected.

Translate the raw query parse tree into a formal parse tree, top level node of the formal parse tree is type of sql statements: such as TSelectSqlStatement, TInsertSqlStatement, TDeleteSqlStatement, TUpdateSqlStatement, TCreateTableSqlStatement and etc. which in turn includes other sub parse tree nodes.


Supported Database


Google BigQuery


Couchbase database


IBM DB2 database


EMC Greenplum


SAP Hana


hadoop hive




IBM Informix database


MySQL database


Netezza database


Openedge database


Oracle database


PostgreSQL database


Amazon redshift


Snowflake SQL


Spark SQL


Microsoft SQL Server database


Sybase database


Teradata database


Vertica database


Microsfot Office Access database
Download General SQL Parser