数据仓库服务 GAUSSDB(DWS)-数字类型:类型对照
类型对照
MySQL数字类型 |
MySQL INPUT |
GaussDB (DWS) OUTPUT |
---|---|---|
DEC |
DEC DEC[(M[,D])] [UNSIGNED] [ZEROFILL] |
DECIMAL DECIMAL[(M[,D])] |
DECIMAL |
DECIMAL[(M[,D])] [UNSIGNED] [ZEROFILL] |
DECIMAL[(M[,D])] |
DOUBLE PRECISION |
DOUBLE PRECISION DOUBLE PRECISION [(M[,D])] [UNSIGNED] [ZEROFILL] |
DOUBLE PRECISION DOUBLE PRECISION |
DOUBLE |
DOUBLE[(M[,D])] [UNSIGNED] [ZEROFILL] |
DOUBLE PRECISION |
FIXED |
FIXED FIXED[(M[,D])] [UNSIGNED] [ZEROFILL] |
DECIMAL DECIMAL[(M[,D])] |
FLOAT |
FLOAT FLOAT [(M[,D])] [UNSIGNED] [ZEROFILL] FLOAT(p) [UNSIGNED] [ZEROFILL] |
REAL REAL REAL |
INT |
INT INT(p) [UNSIGNED] [ZEROFILL] |
INTEGER INTEGER(p) |
INTEGER |
INTEGER INTEGER(p) [UNSIGNED] [ZEROFILL] |
INTEGER INTEGER(p) |
MEDIUMINT |
MEDIUMINT MEDIUMINT(p) [UNSIGNED] [ZEROFILL] |
INTEGER INTEGER(p) |
NUMERIC |
NUMERIC NUMERIC [(M[,D])] [UNSIGNED] [ZEROFILL] |
DECIMAL DECIMAL[(M[,D])] |
REAL |
REAL[(M[,D])] |
REAL/DOUBLE PRECISION |
SMALLINT |
SMALLINT SMALLINT(p) [UNSIGNED] [ZEROFILL] |
SMALLINT |
TINYINT |
TINYINT TINYINT(n) TINYINT(n) ZEROFILL TINYINT(n) UNSIGNED ZEROFILL |
SMALLINT SMALLINT SMALLINT TINYINT |
- TINYINT类型做转换时,如果存在无符号类型(UNSIGNED)修饰则转换为TINYINT,否则转换为SMALLINT。
- REAL类型做转换时,默认转换为DOUBLE PRECISION,如果配置文件(features-mysql.properties)中table.database.realAsFlag标志为true时(默认false),转换为REAL
输入示例TINYINT
1 2 3 4 5 6 7 |
CREATE TABLE IF NOT EXISTS `runoob_dataType_test`( `dataType_1` TINYINT, `dataType_2` TINYINT(0), `dataType_3` TINYINT(255), `dataType_4` TINYINT(255) UNSIGNED ZEROFILL, `dataType_5` TINYINT(255) ZEROFILL ); |
输出示例
1 2 3 4 5 6 7 8 9 10 11 |
CREATE TABLE IF NOT EXISTS "public"."runoob_datatype_test" ( "datatype_1" SMALLINT, "datatype_2" SMALLINT, "datatype_3" SMALLINT, "datatype_4" TINYINT, "datatype_5" SMALLINT ) WITH ( ORIENTATION = ROW, COMPRESSION = NO ) NOCOMPRESS DISTRIBUTE BY HASH ("datatype_1"); |
- 数据仓库服务GaussDB(DWS)_SQL on Anywhere
- GaussDB数据库怎么转换类型_GaussDB安装_高斯数据库转换类型
- DWS安全_数据仓库服务安全_DWS数据安全管理_DWS安全保障_DWS安全策略
- 调用GaussDB(DWS) API接口_数据仓库服务调用API_如何调用API_在DWS中调用API
- GaussDB数据库_gaussdb类型_高斯数据库_华为云
- GaussDB(DWS)常用SQL_常用SQL命令_SQL语法
- GAUSS(DWS)工具_gsql工具_DataStudio工具_DSC工具
- DWS资源管理_GaussDB(DWS)资源管理作用_DWS资源管控
- DWS产品介绍_DWS产品优势_DWS功能_DWS使用场景_DWS是什么
- 数据库监控DMS_数据库智能运维_了解Auto Pilot_DMS_DWS节点监控