<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-ndbinfo-dictionary-columns">
      </a>
      25.6.17.23 The ndbinfo dictionary_columns Table
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045089819600">
  </a>
  <p>
   The table provides
   <code class="literal">
    NDB
   </code>
   dictionary information
        about columns of
   <code class="literal">
    NDB
   </code>
   tables.
   <code class="literal">
    dictionary_columns
   </code>
   has the columns listed
        here (with brief descriptions):
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       table_id
      </code>
     </p>
     <p>
      ID of the table containing the column
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       column_id
      </code>
     </p>
     <p>
      The column's unique ID
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       name
      </code>
     </p>
     <p>
      Name of the column
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       column_type
      </code>
     </p>
     <p>
      Data type of the column from the NDB API; see
      <a class="ulink" href="/doc/ndbapi/en/ndb-column.html#ndb-column-type" target="_top">
       Column::Type
      </a>
      , for possible values
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       default_value
      </code>
     </p>
     <p>
      The column's default value, if any
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       nullable
      </code>
     </p>
     <p>
      Either of
      <code class="literal">
       NULL
      </code>
      or
      <code class="literal">
       NOT
            NULL
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       array_type
      </code>
     </p>
     <p>
      The column's internal attribute storage format; one of
      <code class="literal">
       FIXED
      </code>
      ,
      <code class="literal">
       SHORT_VAR
      </code>
      , or
      <code class="literal">
       MEDIUM_VAR
      </code>
      ; for more information, see
      <a class="ulink" href="/doc/ndbapi/en/ndb-column.html#ndb-column-arraytype" target="_top">
       Column::ArrayType
      </a>
      , in the NDB API
            documentation
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       storage_type
      </code>
     </p>
     <p>
      Type of storage used by the table; either of
      <code class="literal">
       MEMORY
      </code>
      or
      <code class="literal">
       DISK
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       primary_key
      </code>
     </p>
     <p>
      <code class="literal">
       1
      </code>
      if this is a primary key column,
            otherwise
      <code class="literal">
       0
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       partition_key
      </code>
     </p>
     <p>
      <code class="literal">
       1
      </code>
      if this is a partitioning key column,
            otherwise
      <code class="literal">
       0
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       dynamic
      </code>
     </p>
     <p>
      <code class="literal">
       1
      </code>
      if the column is dynamic, otherwise
      <code class="literal">
       0
      </code>
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       auto_inc
      </code>
     </p>
     <p>
      <code class="literal">
       1
      </code>
      if this is an
      <code class="literal">
       AUTO_INCREMENT
      </code>
      column, otherwise
      <code class="literal">
       0
      </code>
     </p>
    </li>
   </ul>
  </div>
  <p>
   You can obtain information about all of the columns in a given
        table by joining
   <code class="literal">
    dictionary_columns
   </code>
   with the
   <a class="link" href="mysql-cluster-ndbinfo-dictionary-tables.html" title="25.6.17.24 The ndbinfo dictionary_tables Table">
    <code class="literal">
     dictionary_tables
    </code>
   </a>
   table, like
        this:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa6188904"><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">SELECT</span> dc<span class="token punctuation">.</span><span class="token operator">*</span>
  <span class="token keyword">FROM</span> dictionary_columns dc
<span class="token keyword">JOIN</span> dictionary_tables dt
  <span class="token keyword">ON</span> dc<span class="token punctuation">.</span>table_id<span class="token operator">=</span>dt<span class="token punctuation">.</span>table_id
<span class="token keyword">WHERE</span> dt<span class="token punctuation">.</span><span class="token keyword">table_name</span><span class="token operator">=</span><span class="token string">'t1'</span>
  <span class="token operator">AND</span> dt<span class="token punctuation">.</span>database_name<span class="token operator">=</span><span class="token string">'mydb'</span><span class="token punctuation">;</span></code></pre>
  </div>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    Blob columns are not shown in this table. This is a known
          issue.
   </p>
  </div>
 </div>
 <br/>
</div>
