IT Talks/Database

[MySQL] INT ์ž๋ฃŒํ˜• (TINYINT / SMALLINT / MEDIUMINT / INT / BIGINT)

OkOJJ 2023. 7. 23. 12:10

๋งค๋ฒˆ ๊ฒ€์ƒ‰ํ•˜๊ธฐ ๊ท€์ฐฎ์•„์„œ ํผ์˜ด ใ…Žใ…Ž

Table 11.1 Required Storage and Range for Integer Types Supported by MySQL

Type Storage
(Bytes)
์ตœ์†Œ๊ฐ’
(signed)
์ตœ์†Œ๊ฐ’
(unsigned)
์ตœ๋Œ€๊ฐ’
(signed)
์ตœ๋Œ€๊ฐ’
(unsigned)
TINYINT 1 -128 0 127 255
SMALLINT 2 -32768 0 32767 65535
MEDIUMINTINT 3 -8388608 0 8388607 16777215
INT 4 -2147483648 0 2147483647 4294967295
BIGINT 8 -2^63 0 2^63 - 1 2^64 - 1

 

* ์ถœ์ฒ˜ : https://dev.mysql.com/doc/refman/8.0/en/integer-types.html

 

 

 

 

728x90