Home >Database >Mysql Tutorial >What is the actual size of an INT(11) column in MySQL?
Column Size of int(11) in MySQL
The size of a column defined as int(11) in MySQL is consistently 4 bytes, regardless of the specified length. This is attributed to the fact that INT data types always occupy 4 bytes regardless of their length.
MySQL provides various integer data types with varying sizes:
The specified length, known as display width, primarily determines the number of characters allocated when displaying data within the MySQL command-line client. For instance, int(3) can accommodate values like 12345, which will be displayed as 12345. However, int(10) stores the same value but allows for padding.
Regarding maximum values, an int(11) can store signed values up to 2,147,483,647 or unsigned values up to 4,294,967,295.
The above is the detailed content of What is the actual size of an INT(11) column in MySQL?. For more information, please follow other related articles on the PHP Chinese website!