Chapter 11 Data Types第11章 数据类型

Table of Contents目录

11.1 Numeric Data Types数字数据类型
11.1.1 Numeric Data Type Syntax数字数据类型语法
11.1.2 Integer Types (Exact Value)整数类型(精确值) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT
11.1.3 Fixed-Point Types (Exact Value)定点类型(精确值) - DECIMAL, NUMERIC
11.1.4 Floating-Point Types (Approximate Value)浮点类型(近似值) - FLOAT, DOUBLE
11.1.5 Bit-Value Type位值类型 - BIT
11.1.6 Numeric Type Attributes数字类型属性
11.1.7 Out-of-Range and Overflow Handling超出范围和溢出处理
11.2 Date and Time Data Types日期和时间数据类型
11.2.1 Date and Time Data Type Syntax日期和时间数据类型语法
11.2.2 The DATE, DATETIME, and TIMESTAMP Types日期、日期时间和时间戳类型
11.2.3 The TIME Type时间类型
11.2.4 The YEAR Type年份类型
11.2.5 Automatic Initialization and Updating for TIMESTAMP and DATETIME时间戳和日期时间的自动初始化和更新
11.2.6 Fractional Seconds in Time Values时间值中的小数秒
11.2.7 Conversion Between Date and Time Types日期和时间类型之间的转换
11.2.8 2-Digit Years in Dates日期中的两位数年份
11.3 String Data Types字符串数据类型
11.3.1 String Data Type Syntax字符串数据类型语法
11.3.2 The CHAR and VARCHAR TypesCHAR和VARCHAR类型
11.3.3 The BINARY and VARBINARY TypesBINARY和VARBINARY类型
11.3.4 The BLOB and TEXT TypesBLOB和TEXT类型
11.3.5 The ENUM TypeENUM类型
11.3.6 The SET TypeSET类型
11.4 Spatial Data Types空间数据类型
11.4.1 Spatial Data Types空间数据类型
11.4.2 The OpenGIS Geometry ModelOpenGIS几何模型
11.4.3 Supported Spatial Data Formats支持的空间数据格式
11.4.4 Geometry Well-Formedness and Validity几何适形性与有效性
11.4.5 Spatial Reference System Support空间参考系统支持
11.4.6 Creating Spatial Columns创建空间柱
11.4.7 Populating Spatial Columns填充空间列
11.4.8 Fetching Spatial Data获取空间数据
11.4.9 Optimizing Spatial Analysis优化空间分析
11.4.10 Creating Spatial Indexes创建空间索引
11.4.11 Using Spatial Indexes使用空间索引
11.5 The JSON Data TypeJSON数据类型
11.6 Data Type Default Values数据类型默认值
11.7 Data Type Storage Requirements数据类型存储要求
11.8 Choosing the Right Type for a Column为列选择正确的类型
11.9 Using Data Types from Other Database Engines使用其他数据库引擎的数据类型

MySQL supports SQL data types in several categories: numeric types, date and time types, string (character and byte) types, spatial types, and the JSON data type. MySQL支持几种类型的SQL数据类型:数字类型、日期和时间类型、字符串(字符和字节)类型、空间类型和JSON数据类型。This chapter provides an overview and more detailed description of the properties of the types in each category, and a summary of the data type storage requirements. 本章提供了每个类别中类型属性的概述和更详细的描述,以及数据类型存储需求的摘要。The initial overviews are intentionally brief. Consult the more detailed descriptions for additional information about particular data types, such as the permissible formats in which you can specify values.最初的概述有意简短。有关特定数据类型的更多信息,如可以指定值的允许格式,请参阅更详细的说明。

Data type descriptions use these conventions:数据类型描述使用以下约定:

11.1 Numeric Data Types
11.2 Date and Time Data Types
11.3 String Data Types
11.4 Spatial Data Types
11.5 The JSON Data Type
11.6 Data Type Default Values
11.7 Data Type Storage Requirements
11.8 Choosing the Right Type for a Column
11.9 Using Data Types from Other Database Engines