I've used MySQL (via PHPMyAdmin) a lot before but never really understood half of it. I'm assuming that for varchar
, length is the maximum length of a string that can go there. But what about for Int
? According to this, Int
is a 4 byte integer, so why have a Length parameter for it? Is it the number of bits for that integer? Why have seperate numeric types when you can just specify the size of Int
? What about for other data types?
views:
53answers:
1
+2
A:
For numeric types, the size is neither bits nor bytes. It's just the display width, that is used when the field has ZEROFILL specified.
Source: http://alexander.kirk.at/2007/08/24/what-does-size-in-intsize-of-mysql-mean/
Infinity
2009-10-21 23:06:29