开发者

what does the mySQL Length parameter do for different types?

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开发者_StackOverflow社区 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?


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜