MySQL中tinytext、text、mediumtext和longtext详解
2016-05-17 15:18
603 查看
一、数字类型
Char(N) [ binary] N=1~255 个字元 binary :分辨大小写 固定长度 std_name cahr(32) not nullChar(N) [ binary] N=1~255 个字元 binary :分辨大小写 固定长度 std_name cahr(32) not null
VarChar(N) [binary] N=1~255 个字元
binary :分辨大小写 可变长度 std_address varchar(256)
TinyBlob 最大长度255个字元(2^8-1)
Blob (Binary large objects)储存二进位资料,且有分大小写
TinyText 最大长度255个字元(2^8-1)
Blob 最大长度65535个字元(2^16-1)
tinytext
longtext Text 最大长度65535个字元(2^16-1)
MediumBlob 最大长度 16777215 个字元(2^24-1)
MediumText 最大长度 16777215 个字元(2^24-1
LongBlob 最大长度4294967295个字元 (2^32-1)
LongText 最大长度4294967295个字元 (2^32-1)
Enum 集合最大数目为65535 列举(Enumeration),Enum单选、Set复选 sex enum(1,0)
habby set(‘玩电玩’,’睡觉’,’看电影’,’听音乐’)
Set 集合最大数目为64
二、数值
TinyInt[M] [UNSIGNED] -128~127 UNSIGNED : 0~255 num tinyint unsignedSmallInt[M] [UNSIGNED] -32768~32767 UNSIGNED :0~ 65535
MediumInt[M] [UNSIGNED] -8388608~8388607 UNSIGNED :0~16777215
Int[M] [UNSIGNED] -2^31~2^31-1 UNSIGNED : 0~2^32
BigInt[M] [UNSIGNED] -2^63~2^63-1 UNSIGNED : 0~2^64
Float [(M,D)] -3.4E+38~3.4E+38( 约 )
Double [(M,D)] -1.79E+308~1.79E+308( 约 )
Decimal [(M,D)]
注: M 为长度, D 为小数,Float 4 bytes,Double 8 bytes
辨別ZeroFill:当宣告关键字ZeroFill为自动填满0,如 000021
三、日期时间
Date 日期(yyyy-mm-dd)Time 时间(hh:mm:ss)
DateTime 日期与时间組合(yyyy-mm-dd hh:mm:ss)
TimeStamp yyyymmddhhmmss
Year 年份yyyy
相关文章推荐
- 把mysql脚本或其他数据库脚本导入Powerdesigner
- mysql锁
- MySQL check the manual that corresponds to your MySQL server version for the right syntax错误
- MySQL备份与还原
- Solr 5,5从Mysql全量、增量导入数据
- MySQL Cluster 集群
- Mysql使用简单教程(二)
- Mysql多实例安装
- 【bug记录】mysql5.7.9-win64 的3534问题
- MySQL常见错误代码及代码说明
- Mysql中的伪列
- 城会玩:三招搞挂MySQL!
- MYSQL 解锁与锁表
- mysql 一般操作
- mysql给用户赋予权限
- mysql索引简介
- 2016最新高薪必备老男孩MySQL数据库DBA核心视频
- MySQL执行计划理解与实践
- MySQL多表SQL查询
- MySQL-5.5 安装