MySQL: bigint Vs int

后端 未结 2 933
别跟我提以往
别跟我提以往 2020-12-13 23:48

I have been using int(10) and just noticed that Wordpress uses bigint(20) - What is different to use bigint(20) and int(10) for id auto increment? Which one should I use for

2条回答
  •  醉话见心
    2020-12-14 00:44

    The only difference is the range of the type. INT is a 32-bit long while BIGINT is 64-bit long, therefore it can store much larger numbers like 123456789123456789 (which cannot be stored as INT).

    Here's a full list of MySQL integer types: http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

提交回复
热议问题