<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="numeric-types">
      </a>
      13.1 Numeric Data Types
     </h2>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="numeric-type-syntax.html">
       13.1.1 Numeric Data Type Syntax
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="integer-types.html">
       13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT,
MEDIUMINT, BIGINT
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="fixed-point-types.html">
       13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="floating-point-types.html">
       13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="bit-type.html">
       13.1.5 Bit-Value Type - BIT
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="numeric-type-attributes.html">
       13.1.6 Numeric Type Attributes
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="out-of-range-and-overflow.html">
       13.1.7 Out-of-Range and Overflow Handling
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045214461024">
  </a>
  <a class="indexterm" name="idm46045214459536">
  </a>
  <a class="indexterm" name="idm46045214458048">
  </a>
  <p>
   MySQL supports all standard SQL numeric data types. These types
      include the exact numeric data types
      (
   <a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
    <code class="literal">
     INTEGER
    </code>
   </a>
   ,
   <a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
    <code class="literal">
     SMALLINT
    </code>
   </a>
   ,
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DECIMAL
    </code>
   </a>
   , and
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     NUMERIC
    </code>
   </a>
   ), as well as the
      approximate numeric data types
      (
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     FLOAT
    </code>
   </a>
   ,
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     REAL
    </code>
   </a>
   , and
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE PRECISION
    </code>
   </a>
   ). The keyword
   <a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
    <code class="literal">
     INT
    </code>
   </a>
   is a synonym for
   <a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
    <code class="literal">
     INTEGER
    </code>
   </a>
   , and the keywords
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DEC
    </code>
   </a>
   and
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     FIXED
    </code>
   </a>
   are synonyms for
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DECIMAL
    </code>
   </a>
   . MySQL treats
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE
    </code>
   </a>
   as a synonym for
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE PRECISION
    </code>
   </a>
   (a nonstandard
      extension). MySQL also treats
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     REAL
    </code>
   </a>
   as a synonym for
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE PRECISION
    </code>
   </a>
   (a nonstandard variation), unless the
   <a class="link" href="sql-mode.html#sqlmode_real_as_float">
    <code class="literal">
     REAL_AS_FLOAT
    </code>
   </a>
   SQL mode is
      enabled.
  </p>
  <p>
   The
   <a class="link" href="bit-type.html" title="13.1.5 Bit-Value Type - BIT">
    <code class="literal">
     BIT
    </code>
   </a>
   data type stores bit values
      and is supported for
   <a class="link" href="myisam-storage-engine.html" title="18.2 The MyISAM Storage Engine">
    <code class="literal">
     MyISAM
    </code>
   </a>
   ,
   <a class="link" href="memory-storage-engine.html" title="18.3 The MEMORY Storage Engine">
    <code class="literal">
     MEMORY
    </code>
   </a>
   ,
   <a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
    <code class="literal">
     InnoDB
    </code>
   </a>
   , and
   <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
    <code class="literal">
     NDB
    </code>
   </a>
   tables.
  </p>
  <p>
   For information about how MySQL handles assignment of out-of-range
      values to columns and overflow during expression evaluation, see
   <a class="xref" href="out-of-range-and-overflow.html" title="13.1.7 Out-of-Range and Overflow Handling">
    Section 13.1.7, “Out-of-Range and Overflow Handling”
   </a>
   .
  </p>
  <p>
   For information about storage requirements of the numeric data
      types, see
   <a class="xref" href="storage-requirements.html" title="13.7 Data Type Storage Requirements">
    Section 13.7, “Data Type Storage Requirements”
   </a>
   .
  </p>
  <p>
   For descriptions of functions that operate on numeric values, see
   <a class="xref" href="numeric-functions.html" title="14.6 Numeric Functions and Operators">
    Section 14.6, “Numeric Functions and Operators”
   </a>
   . The data type used for the
      result of a calculation on numeric operands depends on the types
      of the operands and the operations performed on them. For more
      information, see
   <a class="xref" href="arithmetic-functions.html" title="14.6.1 Arithmetic Operators">
    Section 14.6.1, “Arithmetic Operators”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
