For integer data types,
Mindicates the maximum display width. The maximum display width is 255. Display width is unrelated to the range of values a type can store
说明int(M)中的M是显示宽度, 不会影响类型的取值范围.
所以
-
int(10) int(11) 取值范围 没有区别,
-
bigint(11) bigint(20) 取值范围 没有区别
-
建表时, 直接写 int/bigint 就行了.
| 类型 | 位数 |
|---|---|
| int | 32 |
| bigint | 64 |