What is the difference between tinyint, smallint, mediumint, bigint and int in MySQL?

前端 未结 6 2140
误落风尘
误落风尘 2020-11-29 14:43

What is the difference between tinyint, smallint, mediumint, bigint and int in MySQL?

In what cases should these be used?

6条回答
  •  生来不讨喜
    2020-11-29 14:51

    The difference is the amount of memory allocated to each integer, and how large a number they each can store.

提交回复
热议问题