Mysql基本应用---初识

整数:

tinyint 最小整数 1字节 1~255(-128~127)

smallint 小整形 2字节 0~65535(-32768~32767)

mediumint 中等 3字节 (0~16777215)(-32768~32767)

int 普通 4字节 (0~4294967295)(-8388608~8388607)

bigint 大整数 8字节 (0~18446744073709551615)(-9223372036854775808~9223372036854775807)

浮点型:

float 单精度浮点型 4字节 (最大23位)

double 双精度浮点型 8字节 (最大52位)

日期时间型:

year 年份 1字节 (1901~2155)

date 日期 3字节 (1000-01-01~9999-12-31)

time 时间 3字节 (-838:59:59~838:59:59)

datetime 混合时间 8字节 (1000-01-01 00:00:00)

timestamp 时间戳 4字节 (1970-01-01 08:00:01~2038-01-19 11:14:07)

字符型:

char 定长字符串 0-255字节

varchar 变长字符串 0-65535字节

tinytext 短文本字符串 0-255字节

text 长文本 0-65535字节

mediumtext 中等长度文本 0-16777215字节

longtext 极大文本 0-4294967295字节

enum 取决于枚举个数 1或2字节(最多65535)

set 取决于set成员的数量 1,2,3,4或8个字节

u=833269235,3456770731&fm=26&gp=0.jpg

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.5.2 Zero

WX:xcs345525801 QQ:345525801 Tel:19521445850 Email:xcssh868@163.com

Copyright © 2020 许承胜个人博客 版权所有 备案号:皖ICP备18014705号-1