3333
MySQLERRORNotableDDL / SchemaHIGH confidence
Invalid default value for ENUM column
Production Risk
Low — DDL fails; no table is created or altered.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (status ENUM('active','inactive') DEFAULT 'pending');expected output
ERROR 3333 (HY000): Invalid default value for 'status'.
Fix
Use a valid ENUM member
Use a valid ENUM member
CREATE TABLE t (status ENUM('active','inactive') DEFAULT 'active');Why this works
The default must be an exact match for one of the ENUM members.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3333 ER_INVALID_DEFAULT_ENUM_VALUE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev