1681
MySQLWARNINGCriticalDDLHIGH confidence
Integer display width is deprecated and will be removed in a future release
Production Risk
Low — warning only; existing tables continue to function.
What this means
MySQL warns that specifying a display width for integer types (e.g. INT(11)) is deprecated. The display width attribute has no effect on storage or value range and will be removed.
Why it happens
- 1Using INT(N), TINYINT(N), SMALLINT(N), MEDIUMINT(N), or BIGINT(N) in a CREATE TABLE or ALTER TABLE statement.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (id INT(11) NOT NULL);
expected output
Warning (Code 1681): Integer display width is deprecated and will be removed in a future release.
Fix
Remove display width from integer column definitions
Remove display width from integer column definitions
CREATE TABLE t (id INT NOT NULL);
Why this works
Omitting the display width makes the definition forward-compatible with MySQL 8.0+.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1681 ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev