Help us understand the problem. What is going on with this article?

MySQLのint(11)って何?

More than 3 years have passed since last update.

MySQLのint(11)はサイズを指定できるわけではなく、0を補完するためのオプション
[mysql]mysqlのint(11)のカッコ内の数値の意味 http://dbinfo.sakura.ne.jp/?contents_id=102

intのサイズは4バイトで-21474836472147483647までしか指定出来ません。
サイズは以下のサイトが覚えやすい。インドと中国の人口(25億人)が登録するとサービスが落ちますw
[MySQL]INT型の最大値(IntegerのMAX値2147483647)を覚える方法 · DQNEO起業日記 http://dqn.sakusakutto.jp/2010/05/mysqlintintegermax2147483647.html

ちなみにこれ以上のサイズの数値を指定したい場合は、bigint型を使います。
UnixTimestampは11桁以上になるので、bigint型なら保存できます。

masarufuruya
サーバーサイド、フロントエンド、Unityと色々手を出してる雑食系のフリーランスエンジニア。React Nativeとサーバーレスアーキテクチャがマイブーム。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした