【mysql一个语句查出来】MySQL一个语句查出各种整形占用字节数及最大最小值的实例

时间:2021-07-30  来源:mysql教程  阅读:
select 'bigint unsigned' as type ,Ǝ' as bytes ,~0 as max_num,0 as min_num unionselect 'int unsigned',Ɗ',~0>>32,0 unionselect 'mediumint unsigned',Ɖ',~0>>40,0 unionselect 'smallint unsigned',ƈ',~0>>48,0 unionselect 'tinyint unsigned',Ƈ',~0>>56,0 unionselect 'signed bigint',Ǝ',~0>>1,-(1<<word">63) unionselect 'signed int',Ɗ',~0>>33,-(1<<word">31) unionselect 'signed mediumint',Ɖ',~0>>41,-(1<<23) unionselect 'signed smallint',ƈ',~0>>49,-(1<<15) unionselect 'signed tinyint',Ƈ',~0>>57,-(1<<7);    +--------------------+-------+----------------------+----------------------+| type    | bytes | max_num    | min_num    |+--------------------+-------+----------------------+----------------------+| bigint unsigned | 8  | 18446744073709551615 |     0 || int unsigned  | 4  |   4294967295 |     0 || mediumint unsigned | 3  |    16777215 |     0 || smallint unsigned | 2  |    65535 |     0 || tinyint unsigned | 1  |     255 |     0 || signed bigint  | 8  | 9223372036854775807 | -9223372036854775808 || signed int   | 4  |   2147483647 |   -2147483648 || signed mediumint | 3  |    8388607 |    -8388608 || signed smallint | 2  |    32767 |    -32768 || signed tinyint  | 1  |     127 |     -128 |+--------------------+-------+----------------------+----------------------+rows in set (0.00 sec)

【mysql一个语句查出来】MySQL一个语句查出各种整形占用字节数及最大最小值的实例

http://m.bbyears.com/shujuku/132900.html

推荐访问:mysql增删改查语句 mysql建表语句
相关阅读 猜你喜欢
本类排行 本类最新