What does the mySQL Length parameter do for different types?
I've used MySQL a lot (via PHPMyAdmin) but never really understood half of it. I'm guessing for varchar
length is the maximum length of a string that can get there. But what about Int
? According to this , thisInt
is a 4 byte integer, so why would it need a Length parameter? Is this the number of bits for this integer? Why do you have separate numeric types when you can just specify the size Int
? How about other data types?
source to share
For numeric types, the size is neither bits nor bytes. It is simply the screen width that is used when the field has a zero ZEROFILL.
Source: http://alexander.kirk.at/2007/08/24/what-does-size-in-intsize-of-mysql-mean/
source to share