MYSQL数据类型
时间:2021-07-01 10:21:17
帮助过:41人阅读
7
-128 ~128-1
0 ~ 256-1
smallint 2^15
-32768 ~ 32768-1
0 ~ 65536-1
mediumint 2^23
-8388608 ~ 8388608-1
0 ~ 16777216
int 2^31
-2147483648 ~ 2147483648-1
0 ~ 4294967296
bigint 2^63
-9223372036854776000 ~ 9223372036854776000-1
0 ~ 18446744073709552000
2、浮点型(m是数字总位数,d是小数点后位数)
float[(m, d)]
double[(m, d)]
3、字符型
char(m) 0 ~ 255
varchar() 0 ~ 65535+1
tinytext 0 ~ 256+1
text 0 ~ 65536+2
mediumtext 0 ~ 16777216+3
longtext 0 ~ 4294967296+4
enum("value1", "value2", "value_3")
set("value1", “value2", "value_3"
)
*unsigned修饰数据类型后,将从0开始
MYSQL数据类型
标签:double unsigned ble set class -128 mysql lint pre