4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

unsignedBigIntegerについて調べてみた

Posted at

unsignedBigIntegerは外部キーのデータ型によく使うやつ。

忘れやすいのでメモっておきます。

unsignedBigIntegerは「符号なしBIGINTカラム」

・符号なし・・・正の数のみ
・BIGINTカラム・・・格納サイズは8バイト(-9223372036854775808から9223372036854775807)
・8バイト・・・64ビット(1バイトは8ビット)
・64ビット・・・2の64乗(1ビットは2進数の1桁。つまり、0か1の2種類。なので、64ビットで2×64種類の数値が表せるということ。)
・2の64乗・・・18446744073709551616

ということで、つまりは
unsignedBigIntegerは「0~18446744073709551615」までの値を格納できるデータ型のことで、言い換えると「符号なしBIGINTカラム」

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?