PARSE SQL
Description
The PARSE SQL
syntax is used to parse SQL
and output abstract syntax tree.
Syntax
Grammar Railroad diagram
ParseSql ::=
'PARSE' sqlStatement
Return Value Description
Column | Description |
---|---|
parsed_statement | parsed SQL statement type |
parsed_statement_detail | detail of the parsed statement |
Example
- Parse
SQL
and output abstract syntax tree
PARSE 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)
Reserved word
PARSE
Related links
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .