<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="integer-types">
      </a>
      13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT,
MEDIUMINT, BIGINT
     </h3>
    </div>
   </div>
  </div>
  <p>
   MySQL supports the SQL standard integer types
   <code class="literal">
    INTEGER
   </code>
   (or
   <code class="literal">
    INT
   </code>
   ) and
   <code class="literal">
    SMALLINT
   </code>
   . As an extension to the standard,
        MySQL also supports the integer types
   <code class="literal">
    TINYINT
   </code>
   ,
   <code class="literal">
    MEDIUMINT
   </code>
   , and
   <code class="literal">
    BIGINT
   </code>
   . The following table shows the
        required storage and range for each integer type.
  </p>
  <div class="table">
   <a name="integer-type-storage-and-range">
   </a>
   <p class="title">
    <b>
     Table 13.1 Required Storage and Range for Integer Types Supported by MySQL
    </b>
   </p>
   <div class="table-contents">
    <table summary="Required storage and range for integer types supported by MySQL. Information includes the integer type, the storage size in bytes, the minimum signed and unsigned values, and the maximum signed and unsigned values.">
     <colgroup>
      <col style="width: 16%"/>
      <col style="width: 16%"/>
      <col style="width: 16%"/>
      <col style="width: 16%"/>
      <col style="width: 16%"/>
      <col style="width: 16%"/>
     </colgroup>
     <thead>
      <tr>
       <th scope="col">
        Type
       </th>
       <th scope="col">
        Storage (Bytes)
       </th>
       <th scope="col">
        Minimum Value Signed
       </th>
       <th scope="col">
        Minimum Value Unsigned
       </th>
       <th scope="col">
        Maximum Value Signed
       </th>
       <th scope="col">
        Maximum Value Unsigned
       </th>
      </tr>
     </thead>
     <tbody>
      <tr>
       <th scope="row">
        <code class="literal">
         TINYINT
        </code>
       </th>
       <td>
        1
       </td>
       <td>
        <code class="literal">
         -128
        </code>
       </td>
       <td>
        <code class="literal">
         0
        </code>
       </td>
       <td>
        <code class="literal">
         127
        </code>
       </td>
       <td>
        <code class="literal">
         255
        </code>
       </td>
      </tr>
      <tr>
       <th scope="row">
        <code class="literal">
         SMALLINT
        </code>
       </th>
       <td>
        2
       </td>
       <td>
        <code class="literal">
         -32768
        </code>
       </td>
       <td>
        <code class="literal">
         0
        </code>
       </td>
       <td>
        <code class="literal">
         32767
        </code>
       </td>
       <td>
        <code class="literal">
         65535
        </code>
       </td>
      </tr>
      <tr>
       <th scope="row">
        <code class="literal">
         MEDIUMINT
        </code>
       </th>
       <td>
        3
       </td>
       <td>
        <code class="literal">
         -8388608
        </code>
       </td>
       <td>
        <code class="literal">
         0
        </code>
       </td>
       <td>
        <code class="literal">
         8388607
        </code>
       </td>
       <td>
        <code class="literal">
         16777215
        </code>
       </td>
      </tr>
      <tr>
       <th scope="row">
        <code class="literal">
         INT
        </code>
       </th>
       <td>
        4
       </td>
       <td>
        <code class="literal">
         -2147483648
        </code>
       </td>
       <td>
        <code class="literal">
         0
        </code>
       </td>
       <td>
        <code class="literal">
         2147483647
        </code>
       </td>
       <td>
        <code class="literal">
         4294967295
        </code>
       </td>
      </tr>
      <tr>
       <th scope="row">
        <code class="literal">
         BIGINT
        </code>
       </th>
       <td>
        8
       </td>
       <td>
        <code class="literal">
         -2
         <sup>
          63
         </sup>
        </code>
       </td>
       <td>
        <code class="literal">
         0
        </code>
       </td>
       <td>
        <code class="literal">
         2
         <sup>
          63
         </sup>
         -1
        </code>
       </td>
       <td>
        <code class="literal">
         2
         <sup>
          64
         </sup>
         -1
        </code>
       </td>
      </tr>
     </tbody>
    </table>
   </div>
  </div>
  <br class="table-break"/>
 </div>
 <br/>
</div>
