本文介绍了int(11)和int(11)UNSIGNED有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

int(11)int(11) UNSIGNED有什么区别?

解决方案

UNSIGNED类型不能为负,但另一方面,它的范围是正整数的两倍.类型TINYINT,SMALLINT,MEDIUMINT,INT和BIGINT都有签名和未签名的版本.

对于INT,范围定义如下:

Type          Storage         Min           Max
INT                 4 -2147483648    2147483647
INT UNSIGNED        4           0    4294967295

有符号和无符号类型占用相同的存储空间(INT为4字节).

有关详细信息,请参见文档. /p>

What's the difference in int(11) and int(11) UNSIGNED ?

解决方案

An UNSIGNED type cannot be negative, but on the other hand it has twice as large a range for the positive integers. The types TINYINT, SMALLINT, MEDIUMINT,INT and BIGINT all have signed and unsigned versions.

For INT the ranges are defined as follows:

Type          Storage         Min           Max
INT                 4 -2147483648    2147483647
INT UNSIGNED        4           0    4294967295

The signed and unsigned types take the same storage space (4 bytes for INT).

See the documentation for more details.

这篇关于int(11)和int(11)UNSIGNED有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 21:24