MySQL supports all standard SQL numeric data types. MySQL支持所有标准的SQL数字数据类型。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). INTEGER、SMALLINT、DECIMAL和numeric)以及近似的数字数据类型(FLOAT、REAL和DOUBLE PRECISION)。The keyword 关键字INT is a synonym for INTEGER, and the keywords DEC and FIXED are synonyms for DECIMAL. INT是INTEGER的同义词,关键字DEC和FIXED是DECIMAL的同义词。MySQL treats MySQL将DOUBLE as a synonym for DOUBLE PRECISION (a nonstandard extension). DOUBLE视为DOUBLE PRECISION(非标准扩展)的同义词。MySQL also treats MySQL还将REAL as a synonym for DOUBLE PRECISION (a nonstandard variation), unless the REAL_AS_FLOAT SQL mode is enabled.REAL视为DOUBLE PRECISION(非标准变体)的同义词,除非启用了REAL_AS_FLOATSQL模式。
The BIT data type stores bit values and is supported for MyISAM, MEMORY, InnoDB, and NDB tables.BIT数据类型存储位值,MyISAM、MEMORY、InnoDB和NDB表支持NDB数据类型。
For information about how MySQL handles assignment of out-of-range values to columns and overflow during expression evaluation, see Section 11.1.7, “Out-of-Range and Overflow Handling”.有关MySQL在表达式求值期间如何处理对列的越界值赋值和溢出的信息,请参阅第11.1.7节,“超出范围和溢出处理”。
For information about storage requirements of the numeric data types, see Section 11.7, “Data Type Storage Requirements”.有关数字数据类型的存储要求的信息,请参阅第11.7节,“数据类型存储要求”。
For descriptions of functions that operate on numeric values, see Section 12.6, “Numeric Functions and Operators”. 有关对数值进行操作的函数的说明,请参阅第12.6节,“数值函数和运算符”。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”.有关详细信息,请参阅第12.6.1节,“算术运算符”。