Is there a difference in using INT(1) vs TINYINT(1) in MySQL?

前端 未结 3 1071
借酒劲吻你
借酒劲吻你 2020-12-13 03:42

I\'m under the assumption that INT(1) is the exact same thing as TINYINT(1) but I really have no idea. Whenever I\'ve had values that can only be a single integer (e.g. a va

3条回答
  •  遥遥无期
    2020-12-13 04:18

    The number in parentheses for integer column types is the "display width". This does not effect the storage requirements as they are pre-defined.

    Further reading

    • http://dev.mysql.com/doc/refman/5.0/en/data-types.html
    • http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

提交回复
热议问题