8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 13 种数据类型 / 13.1 数字数据类型
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

13.1 数值数据类型13.1 Numeric Data Types

MySQL supports all standard SQL numeric data types. These types include the exact numeric data types (INTEGER, SMALLINT, DECIMAL,以及NUMERIC), as well as the approximate numeric data types (FLOAT, REAL,以及DOUBLE PRECISION). The keyword INT is a synonym for INTEGER, and the keywords DEC以及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.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.

BIT 数据类型存储比特值,并且支持用于 MyISAM、MEMORY、InnoDB 以及 NDB 表。The BIT data type stores bit values and is supported for MyISAM, MEMORY, InnoDB, and NDB tables.

有关 MySQL 如何处理列的超出范围值分配以及表达式计算期间的溢出,请参见 第 13.1.7 节,“超出范围和溢出处理”。For information about how MySQL handles assignment of out-of-range values to columns and overflow during expression evaluation, see Section 13.1.7, “Out-of-Range and Overflow Handling”.

有关数值数据类型存储要求的信息,请参见 第 13.7 节,“数据类型存储要求”。For information about storage requirements of the numeric data types, see Section 13.7, “Data Type Storage Requirements”.

有关对数值进行操作的函数的描述,请参见 第 14.6 节,“数值函数和运算符”。对数值操作数进行计算时使用的数据类型取决于操作数的类型以及对它们执行的操作。如需更多信息,请参见 第 14.6.1 节,“算术运算符”。For descriptions of functions that operate on numeric values, see Section 14.6, “Numeric Functions and Operators”. 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 14.6.1, “Arithmetic Operators”.