I know that the number inside the brackets does not control the storage limit; but I'm curious why it is popular to write INT(11) when it only stores 10 digits (unsigned 4,294,967,295). Using numbers smaller than capacity, such as tinyint(1) , is understandable, but why higher?
INT(11)
tinyint(1)
The value of the integer is 11:10 digits + 1 character
The unsigned integer is 10.
This is because 11 counts the digit of the character
When working with type INT, the size "size" is the size of the display. INT - 4 bytes.
Additional (10 + 1) for the minus sign. If you make it unsigned int, the default size will be 10, not 11.
There would be no reason to go beyond 11.
Source: https://habr.com/ru/post/1401599/More articles:How to enable copy / cut / paste jMenuItem - javaHow can I debug test cases executed by Tycho? - javahow to use cookies in jQuery - javascriptWhat does the symbol Mu (ΞΌ) mean when you look at some temporary representations - javaGetting SVG to scale using browser window / device - svgDisable command history in a Windows batch file - command-lineHow to get PHP for XML echo tags? - htmlThe problem of understanding CALayer Geometry. Need help - iosFirefox 11 Security Error? How to track it - javascriptJSTL: What's the point? - jstlAll Articles