I create columns in MySQL Workbench and it often puts different numbers in parentheses after datatype, e.g. I input this:

Column Name          Datatype:
id                   INT
account_parameters   INT
accounts             TINYINT
account_properties   TINYINT

and after executing the query I get

Column Name          Datatype:
id                   INT(10)
account_parameters   INT(11)
accounts             TINYINT(1)
account_properties   TINYINT(2)

Why does it do it? Is there a reason why one should be INT(11), while others are INT(10)?

  • And the number means nothing (unless you use ZEROFILL). – Rick James Jul 8 '17 at 16:56

In this case, the difference is likely due to the int and tinyint being signed (default) or unsigned in their definitions. Note that the numbers in the parentheses are largely irrelevant for most applications (they define a display width).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.