首页 » MySQL » MySQL tinyint/smallint/int/bigint

MySQL tinyint/smallint/int/bigint

原文 http://blog.csdn.net/iamlauy/article/details/78553061

2017-11-17 02:02:11阅读(250)

MySQL tinyint/smallint/int/bigint取值范围

数据类型 存储大小 取值范围 最大存储位数 tinyint 1 字节 signed : -128 ~ 127 3位 unsigned : 0 ~ 255 3位 smallint 2 字节 signed : -32768 ~ 32767 5位 unsigned : 0 ~ 65535 5位 int 4 字节 signed : -2147483648 ~ 2147483647 10位 unsigned : 0 ~ 4294967295 10位 bigint 8 字节 signed : -9223372036854775808 ~ 9223372036854775807 19位 unsigned : 0 ~ 18446744073709551615 20位
    mysql> help tinyint;
    A very small integer. 
    The signed range is -128 to 127. 
    The unsigned range is 0 to 255.
    mysql> help smallint;
    A small integer. 
    The signed range is -32768 to 32767. 
    The unsigned range is 0 to 65535.
    mysql> help int;
    A normal-size integer. 
    The signed range is -2147483648 to 2147483647.
    The unsigned range is 0 to 4294967295.
    mysql> help bigint;
    A large integer. 
    The signed range is -9223372036854775808 to 9223372036854775807. 
    The unsigned range is 0 to 18446744073709551615.

最新发布

CentOS专题

关于本站

5ibc.net旗下博客站精品博文小部分原创、大部分从互联网收集整理。尊重作者版权、传播精品博文,让更多编程爱好者知晓!

小提示

按 Ctrl+D 键,
把本文加入收藏夹

天天可领!最高99块!土豪站长12月发红包啦!

关闭
支付宝红包