mysql 数据类型别名参考
To facilitate the use of code written for SQL implementations from other vendors, MySQL maps data
types as shown in the following table. These mappings make it easier to import table definitions from
other database systems into MySQL.
Other Vendor Type MySQL Type
BOOL TINYINT
BOOLEAN TINYINT
CHARACTER VARYING(M) VARCHAR(M)
FIXED DECIMAL
FLOAT4 FLOAT
FLOAT8 DOUBLE
INT1 TINYINT
INT2 SMALLINT
INT3 MEDIUMINT
INT4 INT
INT8 BIGINT
LONG VARBINARY MEDIUMBLOB
LONG VARCHAR MEDIUMTEXT
LONG MEDIUMTEXT
MIDDLEINT MEDIUMINT
NUMERIC DECIMAL
Data type mapping occurs at table creation time, after which the original type specifications are
discarded. If you create a table with types used by other vendors and then issue a DESCRIBE
tbl_name statement, MySQL reports the table structure using the equivalent MySQL types. For
example:
mysql> CREATE TABLE t (a BOOL, b FLOAT8, c LONG VARCHAR, d NUMERIC);
Query OK, 0 rows affected (0.00 sec)
mysql> DESCRIBE t;
+-------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| a | tinyint(1) | YES | | NULL | |
| b | double | YES | | NULL | |
| c | mediumtext | YES | | NULL | |
| d | decimal(10,0) | YES | | NULL | |
+-------+---------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
最新文章
- AnjularJS系列5 —— scopes、module、controller
- 搜索引擎Solr系列(一): Solr6.2.1环境搭建
- HDFS的运行原理
- 极限编程之TDD
- PL/SQL常用设置 可看引用位置更清晰直观 引自:http://blog.csdn.net/xiaoqforever/article/details/27695569
- SendMail
- Codeforces Round #313 A Currency System in Geraldion
- PHP简易计算器方法2
- ThinkPHP--IS_AJAX
- ZOJ3508 The War 贪心,最大流
- Jquery cookie操作示例,写入cookie,读取cookie,删除cookie
- sspanelv3魔改版邮件设置指南及常用配置
- spring boot中利用mybatis-generator插件生成代码
- NOIP水题测试(2017082301)
- Mac环境 MySQL 和 MySQLWorkBench 破解版百度云下载
- mongodb安装及副本集搭建
- bzoj1620 / P2920 [USACO08NOV]时间管理Time Management
- Introduction Sockets to Programming in C using TCP/IP
- 高可用Kubernetes集群-10. 部署kube-proxy
- mysql表的完整性约束
热门文章
- vuex commit保存数据技巧
- [持续开源]基于nodejs+ligerui的一款mongodb web 端查询工具(MongoStudio)
- Myeclipse修改设置Default VM Arguments
- centOS7配置DNS服务器
- [SDOI 2008]Cave 洞穴勘测
- [HAOI2006]旅行
- 4999: This Problem Is Too Simple!
- bzoj1073[SCOI2007]kshort
- [usaco6.1.1Postal Vans]
- Thinkphp中的U函数(Thinkphp3.2.3版本)