INT3 is not part of the ANSI SQL standard. It is a legacy MySQL synonym for MEDIUMINT, which occupies 3 bytes per row. Signed INT3 ranges from -8,388,608 to 8,388,607, while UNSIGNED extends the positive range to 0–16,777,215.INT3 behaves exactly like MEDIUMINT in every respect: you can specify an optional display width (e.g., INT3(6)), apply the UNSIGNED modifier for a larger positive range, and use ZEROFILL to left-pad displayed values. Beginning with MySQL 8.0, display width is ignored unless ZEROFILL is present, but the INT3 alias still parses.Because INT3 is MySQL-only, code that relies on it will not run on PostgreSQL, SQL Server, Oracle, SQLite, or even standard SQL. For portability and clarity, MySQL’s own documentation recommends using the canonical name MEDIUMINT instead of aliases such as INT3, INT4, or INT8.
display_width
(integer) - Optional visual width used with ZEROFILL.SIGNED
(keyword) - Default; allows negative values.UNSIGNED
(keyword) - Restricts column to non-negative values and doubles the positive range.ZEROFILL
(keyword) - Pads returned values with leading zeros up to display_width.MEDIUMINT, TINYINT, SMALLINT, INT, BIGINT, SIGNED, UNSIGNED, ZEROFILL
MySQL 3.23
Yes. In MySQL, INT3 is simply a synonym for MEDIUMINT. Both names allocate 3 bytes per row and share the same numeric range. Using MEDIUMINT is clearer to readers and recommended by MySQL’s documentation.
A signed INT3 column accepts values from -8,388,608 to 8,388,607. Adding the UNSIGNED modifier changes the range to 0–16,777,215.
No. INT3 is unique to MySQL and MariaDB. PostgreSQL, SQL Server, Oracle, and SQLite do not recognize the alias, so queries containing INT3 will fail on those systems.
Choose INT3 (MEDIUMINT) when you need more capacity than SMALLINT but want to save 1 byte per row compared with INT. Use INT when you need the full 32-bit range or maximum portability across databases.