<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="information-schema-innodb-temp-table-info-table">
      </a>
      28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045076283856">
  </a>
  <p>
   The
   <a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
    <code class="literal">
     INNODB_TEMP_TABLE_INFO
    </code>
   </a>
   table
      provides information about user-created
   <code class="literal">
    InnoDB
   </code>
   temporary tables that are active in an
   <code class="literal">
    InnoDB
   </code>
   instance. It does not provide information about internal
   <code class="literal">
    InnoDB
   </code>
   temporary tables used by the optimizer.
      The
   <a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
    <code class="literal">
     INNODB_TEMP_TABLE_INFO
    </code>
   </a>
   table is
      created when first queried, exists only in memory, and is not
      persisted to disk.
  </p>
  <p>
   For usage information and examples, see
   <a class="xref" href="innodb-information-schema-temp-table-info.html" title="17.15.7 InnoDB INFORMATION_SCHEMA Temporary Table Info Table">
    Section 17.15.7, “InnoDB INFORMATION_SCHEMA Temporary Table Info Table”
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
    <code class="literal">
     INNODB_TEMP_TABLE_INFO
    </code>
   </a>
   table has
      these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       TABLE_ID
      </code>
     </p>
     <p>
      The table ID of the temporary table.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       NAME
      </code>
     </p>
     <p>
      The name of the temporary table.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       N_COLS
      </code>
     </p>
     <p>
      The number of columns in the temporary table. The number
          includes three hidden columns created by
      <code class="literal">
       InnoDB
      </code>
      (
      <code class="literal">
       DB_ROW_ID
      </code>
      ,
      <code class="literal">
       DB_TRX_ID
      </code>
      , and
      <code class="literal">
       DB_ROLL_PTR
      </code>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SPACE
      </code>
     </p>
     <p>
      The ID of the temporary tablespace where the temporary table
          resides.
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045076262976">
   </a>
   Example
  </h4>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa10898956"><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">CREATE</span> <span class="token keyword">TEMPORARY</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>c1 <span class="token datatype">INT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span><span class="token operator">=</span>INNODB<span class="token punctuation">;</span>

<span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>INNODB_TEMP_TABLE_INFO\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>
TABLE_ID<span class="token punctuation">:</span> 97
    NAME<span class="token punctuation">:</span> #sql8c88_43_0
  N_COLS<span class="token punctuation">:</span> 4
   SPACE<span class="token punctuation">:</span> 76</span></code></pre>
  </div>
  <h4>
   <a name="idm46045076259712">
   </a>
   Notes
  </h4>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      This table is useful primarily for expert-level monitoring.
     </p>
    </li>
    <li class="listitem">
     <p>
      You must have the
      <a class="link" href="privileges-provided.html#priv_process">
       <code class="literal">
        PROCESS
       </code>
      </a>
      privilege to query this table.
     </p>
    </li>
    <li class="listitem">
     <p>
      Use the
      <code class="literal">
       INFORMATION_SCHEMA
      </code>
      <a class="link" href="information-schema-columns-table.html" title="28.3.8 The INFORMATION_SCHEMA COLUMNS Table">
       <code class="literal">
        COLUMNS
       </code>
      </a>
      table or the
      <a class="link" href="show-columns.html" title="15.7.7.6 SHOW COLUMNS Statement">
       <code class="literal">
        SHOW COLUMNS
       </code>
      </a>
      statement to view
          additional information about the columns of this table,
          including data types and default values.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
