What is it with INT(11) columns?

At every company I’ve worked for and many open source projects I see MyISAM tables with INT(11) columns. Why?

MySQL’s INT columns are limited to 2^32 unsigned (4,294,967,295) which if you count the length is 10 digits long. Therefore INT(11) is impossible – although it worth noting the length on integer columns is only the display width.

If you’re looking to reduce the size of your tables/rows use the appropriate type of integer column.

</rant>

blog comments powered by Disqus

Categories

xhtml 1.1 compliant   xhtml 1.1 compliant