int(11) vs. int(anything else)

前端 未结 7 2108
借酒劲吻你
借酒劲吻你 2020-11-27 15:19

I\'m new to web programming and doing different tutorials that I can find on the net.

I did my research and found out that in int(11), 11 is the maximum display widt

7条回答
  •  旧时难觅i
    2020-11-27 15:37

    Copying from this blog article:

    MySQL has a little know feature for numerical types known as zerofill. This feature effects the display size of numerical types. Unlike the string types the number inside the parentheses is not the storage size in characters for the type. For numerical types the type name itself determines storage size.

    The integer type it’s the padding size for zerofill.

提交回复
热议问题