# What size for INT field in MySQL?

Noob question ))
When you create a field in mysql of type INT, which specify the size?
Size 5 means here a max number of 5 or a maximum number of 5 digits can be recorded or is it some other value?
July 9th 19 at 11:13
July 9th 19 at 11:15
Solution
Yes 5 - high 5 figures, but if you specify 10, then the maximum value will be ten nines and 2147483647
The maximum and minimum values of the other fields: dev.mysql.com/doc/refman/5.7/en/integer-types.html
the maximum field value can be 2147483647 ? this can be written a number of 2147483647 digits? =O - christina commented on July 9th 19 at 11:18
: no value! Not the number of digits in this value, edit the response - Chyna.Gusikowski commented on July 9th 19 at 11:21
thank you! and I have everywhere the value of 11 for an int wrote.. having a maximum of 10 - christina commented on July 9th 19 at 11:24
A popular misconception) - Adeline.Goldner commented on July 9th 19 at 11:27
: Yes you are right, but beginners will be quite difficult to understand the meaning of the material on rmcreative I liked the explanation on sql.ru:
I create an INT(99) and when looking through DESC `table` in the Type is written INT(99). Strange, because the value length is greater than the maximum value of the record is not possible, ie more than 10 characters I like it or not write can not.Consider this feature. Importantly, you will understand that it is 4 bytes and that really they can be saved.
- Chyna.Gusikowski commented on July 9th 19 at 11:30
July 9th 19 at 11:17
You will be surprised, but what you call a size is not a size:
rmcreative.ru/blog/post/mysql--dlina-int
then I don't understand what value there is need to specify.. - christina commented on July 9th 19 at 11:20
: If you do not use zerofill, then you can specify INTor write routine INT(10). - Chyna.Gusikowski commented on July 9th 19 at 11:23

Find more questions by tags MySQL