Retro Eye care Haitian Deep Dark Default

PARSE SQL

Description

The PARSE SQL syntax is used to parse SQL and output abstract syntax tree.

Syntax

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