Home  >  Article  >  Backend Development  >  mysql里的int跟int(num)有何区别?解决思路

mysql里的int跟int(num)有何区别?解决思路

WBOY
WBOYOriginal
2016-06-13 13:27:061066browse

mysql里的int跟int(num)有何区别?
比如说int(num)跟int有什么区别?好像在实际数据插入当中也限制不了显示宽度啊,除了加zerofill属性的时候必须占有num位这个作用之外

------解决方案--------------------
没有区别
作为例外,你已经知道了 zerofill 属性绑定的 num

用工具生成的都有一个最大宽度,用来提醒你这个数值最大的位数,以免溢出了还不知道
------解决方案--------------------
这和C风格格式化字符串是一样的, 超过限制就会完整显示了.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn