int,long,还有mysql的int

来源:互联网 发布:mysql怎么优化sql语句 编辑:程序博客网 时间:2024/05/18 01:46

在mysql中输入 desrcibe tablename;

会看到所有属性的取值范围:

 

其中,int(11)不是说int有11个字节,而是说int的显示宽度是11位的。mysql中的int也是4字节。

 

C++中的int和long需要继续讨论。

 

java中的int是4字节,long是8字节。