DBAtlas · Database operations atlas

1264: Out of range value for column

MySQL

What does it mean?

A value outside the range allowed by the type was inserted into a numeric or date column. This error is raised in strict SQL mode.

Why does it happen?

Exceeding the limit of types such as TINYINT/INT (e.g. 200 into TINYINT, or a negative value into an UNSIGNED column), date/number overflow, or sending a larger value than expected.

How to fix it

Widen the column type as needed (e.g. INT instead of TINYINT, BIGINT instead of INT) or fix the signedness (SIGNED/UNSIGNED). Validate value ranges in the application. Even if you want silent clipping behavior (not recommended), make the data compatible with the type instead of removing STRICT from sql_mode.

Open in DBAtlas →

More from this engine