MySQL supports all standard SQL numeric data types. These types
include the exact numeric data types (
NUMERIC), as well as the approximate numeric
data types (
DOUBLE PRECISION). The keyword
INT is a synonym for
INTEGER, and the keywords
FIXED are synonyms
DECIMAL. MySQL treats
DOUBLE as a synonym for
PRECISION (a nonstandard extension). MySQL also treats
REAL as a synonym for
PRECISION (a nonstandard variation), unless the
REAL_AS_FLOAT SQL mode is
As of MySQL 5.0.3, a
BIT data type is available
for storing bit-field values. (Before 5.0.3, MySQL interprets
TINYINT(1).) In MySQL
BIT is supported only for
MyISAM. MySQL 5.0.5 extends
BIT support to
For information about how MySQL handles assignment of out-of-range values to columns and overflow during expression evaluation, see Section 11.2.6, “Out-of-Range and Overflow Handling”.
For information about numeric type storage requirements, see Section 11.7, “Data Type Storage Requirements”.
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 Section 12.6.1, “Arithmetic Operators”.