Rechercher dans le manuel MySQL
11.2 Numeric Types
[+/-]
- 11.2.1 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT
- 11.2.2 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC
- 11.2.3 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE
- 11.2.4 Bit-Value Type - BIT
- 11.2.5 Numeric Type Attributes
- 11.2.6 Out-of-Range and Overflow Handling
MySQL supports all standard SQL numeric data types. These types
include the exact numeric data types
(INTEGER
,
SMALLINT
,
DECIMAL
, and
NUMERIC
), as well as the
approximate numeric data types
(FLOAT
,
REAL
, and
DOUBLE PRECISION
). The keyword
INT
is a synonym for
INTEGER
, and the keywords
DEC
and
FIXED
are synonyms for
DECIMAL
. MySQL treats
DOUBLE
as a synonym for
DOUBLE PRECISION
(a nonstandard
extension). MySQL also treats REAL
as a synonym for DOUBLE PRECISION
(a nonstandard variation), unless the
REAL_AS_FLOAT
SQL mode is
enabled.
The BIT
data type stores bit values
and is supported for MyISAM
,
MEMORY
,
InnoDB
, and
NDB
tables.
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.8, “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”.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-numeric-types.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.