<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-parse-tree">
      </a>
      15.7.7.26 SHOW PARSE_TREE Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045170065744">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa97634425"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> PARSE_TREE <em class="replaceable">select_statement</em></code></pre>
  </div>
  <p>
   <a class="link" href="show-parse-tree.html" title="15.7.7.26 SHOW PARSE_TREE Statement">
    <code class="literal">
     SHOW PARSE_TREE
    </code>
   </a>
   displays a
        representation of the parse tree for the input
   <a class="link" href="select.html" title="15.2.13 SELECT Statement">
    <code class="literal">
     SELECT
    </code>
   </a>
   statement, in JSON format.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    This statement is available only in debug builds, or if the
          MySQL server was built using
    <a class="link" href="source-configuration-options.html#option_cmake_with_show_parse_tree">
     <code class="option">
      -DWITH_SHOW_PARSE_TREE
     </code>
    </a>
    . It is
          intended for use in testing and development only, and not in
          production.
   </p>
  </div>
  <p>
   Example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa79942265"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SHOW</span> PARSE_TREE <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t3 <span class="token keyword">WHERE</span> o_id <span class="token operator">&gt;</span> <span class="token number">2</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Show_parse_tree<span class="token punctuation">:</span> {
  "text"<span class="token punctuation">:</span> "SELECT <span class="token punctuation">*</span> FROM t3 WHERE o_id &gt; 2",
  "type"<span class="token punctuation">:</span> "PT_select_stmt",
  "components"<span class="token punctuation">:</span> [
    {
      "text"<span class="token punctuation">:</span> "SELECT <span class="token punctuation">*</span> FROM t3 WHERE o_id &gt; 2",
      "type"<span class="token punctuation">:</span> "PT_query_expression",
      "components"<span class="token punctuation">:</span> [
        {
          "text"<span class="token punctuation">:</span> "SELECT <span class="token punctuation">*</span> FROM t3 WHERE o_id &gt; 2",
          "type"<span class="token punctuation">:</span> "PT_query_specification",
          "components"<span class="token punctuation">:</span> [
            {
              "text"<span class="token punctuation">:</span> "<span class="token punctuation">*</span>",
              "type"<span class="token punctuation">:</span> "PT_select_item_list",
              "components"<span class="token punctuation">:</span> [
                {
                  "text"<span class="token punctuation">:</span> "<span class="token punctuation">*</span>",
                  "type"<span class="token punctuation">:</span> "Item_asterisk"
                }
              ]
            },
            {
              "text"<span class="token punctuation">:</span> "t3",
              "type"<span class="token punctuation">:</span> "PT_table_factor_table_ident",
              "table_ident"<span class="token punctuation">:</span> "`t3`"
            },
            {
              "text"<span class="token punctuation">:</span> "o_id &gt; 2",
              "type"<span class="token punctuation">:</span> "PTI_where",
              "components"<span class="token punctuation">:</span> [
                {
                  "text"<span class="token punctuation">:</span> "o_id &gt; 2",
                  "type"<span class="token punctuation">:</span> "PTI_comp_op",
                  "operator"<span class="token punctuation">:</span> "&gt;",
                  "components"<span class="token punctuation">:</span> [
                    {
                      "text"<span class="token punctuation">:</span> "o_id",
                      "type"<span class="token punctuation">:</span> "PTI_simple_ident_ident"
                    },
                    {
                      "text"<span class="token punctuation">:</span> "2",
                      "type"<span class="token punctuation">:</span> "Item_int"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
</span><span class="token output">1 row in set (0.01 sec)</span></code></pre>
  </div>
 </div>
 <br/>
</div>
