In using SequelPro it uses a default INT length (for display!) of 11 when creating a table. For example:
CREATE TABLE `tbl` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
My question is why does it do that, if the (11)
is only used for display purposes if zerofill is enabled, which seems like such an odd property to have on by default and it's meaningless without it.
Update: Yes, I know that the (11)
is the display width and does not change the byte-size of INT
which is 4 in mysql. My question is why it uses the (11)
AS A DEFAULT for the display-width-when-using-zero-fill in the application? I know writing all these caps is obnoxious, but no one seems to read the full question (there are 5 answers/comments that all say the same thing).