The PARSE SQL
syntax is used to parse SQL
and output abstract syntax tree.
ParseSql ::=
'PARSE' sqlStatement
Column | Description |
---|---|
parsed_statement | parsed SQL statement type |
parsed_statement_detail | detail of the parsed statement |
SQL
and output abstract syntax treePARSE SELECT * FROM t_order;
mysql> PARSE SELECT * FROM t_order;
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| parsed_statement | parsed_statement_detail |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| MySQLSelectStatement | {"projections":{"startIndex":7,"stopIndex":7,"projections":[{"startIndex":7,"stopIndex":7}],"distinctRow":false},"from":{"tableName":{"startIndex":14,"stopIndex":20,"identifier":{"value":"t_order","quoteCharacter":"NONE"}}},"parameterCount":0,"parameterMarkerSegments":[],"commentSegments":[]} |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
PARSE