The error means a value you try to store exceeds the numeric range or scale defined for the target column.
Out of range value (Error 1264) occurs when an INSERT or UPDATE assigns a number larger than the column’s allowed range or scale. Cast the data, widen the column type, or clamp the input to resolve the issue.
ERROR 1264 (22003): Out of range value for column 'column_name' at row 1
MySQL error 1264 triggers when an INSERT, UPDATE, or LOAD DATA statement supplies a numeric value that cannot be represented by the destination column’s data type or scale. The server blocks the write to protect data integrity.
The error surfaces most often with TINYINT, SMALLINT, INT, BIGINT, DECIMAL, and NUMERIC columns that have tight precision or are declared UNSIGNED.
The server evaluates each row before committing.
If any value falls outside the column’s min-max boundary or its DECIMAL precision/scale, MySQL raises error 1264 and—under strict SQL mode—rejects the entire statement.
In non-strict mode, MySQL may truncate the overflow value and issue a warning instead, potentially leading to silent data loss.
Leaving the error unresolved blocks data ingestion pipelines, ETL jobs, and application writes.
Ignoring warnings in permissive modes risks corrupted analytics and faulty business logic due to silently altered numbers.
Primary triggers include numeric overflow, wrong UNSIGNED / SIGNED selection, DECIMAL scale mismatches, and strict SQL mode enforcement. Each cause is fixable through schema updates or data cleansing workflows.
Identify the offending column and row, widen the data type or convert incoming data.
Typical remedies involve altering column definitions, using CAST(), or bounding values with LEAST()/GREATEST().
Overflowing auto-increment counters, importing CSVs with rogue values, and migrating from PostgreSQL BIGINT to MySQL INT are frequent sources.
Step-by-step SQL fixes appear below.
Design schemas with headroom, validate inputs in application code, enable monitoring for warnings, and adopt tools like Galaxy’s AI copilot to flag type mismatches during query authoring.
Numeric value out of range (SQLSTATE 22003) in PostgreSQL, Data truncated for column in MySQL, and Division by zero errors share similar root causes and preventive tactics.
.
Yes in strict mode. In permissive modes MySQL may insert a truncated value and issue only a warning.
The error message shows the exact column name and row offset; use LIMIT and ORDER BY to reproduce.
Galaxy’s AI copilot highlights type mismatches while you write SQL and suggests ALTER statements before execution.
Disabling strict mode should be temporary; long-term fixes involve schema or data corrections.