Issues faced with int(11) datatype in MYSQL

后端 未结 2 655
渐次进展
渐次进展 2021-01-15 18:25

I have a table in MYSQL in with a primary key id int(11) (auto-incremented). Now I have a program which reads some text file and enters the value in id column. So my table s

2条回答
  •  有刺的猬
    2021-01-15 18:29

    Definition from mysql manual for the int data type:

    A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295.

    The int type is always 4 bytes (32 bits). The 11 in int(11) is just the "display width", that only matters for UNSIGNED ZEROFILL columns. More details on this blog post.

提交回复
热议问题