1713
MySQLERRORNotableDDLHIGH confidence

Invalid column size or precision specified

Production Risk

Low — DDL fails; no data affected.

What this means

The size or precision specified for a column definition is invalid — either out of the allowed range or incompatible with the column type.

Why it happens
  1. 1Specifying DECIMAL(66, 30) — exceeds maximum precision of 65.
  2. 2Using a negative or zero length for VARCHAR or CHAR.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (price DECIMAL(66, 30));

expected output

ERROR 1713 (HY000): Invalid column size.

Fix

Use a valid precision and scale

Use a valid precision and scale
CREATE TABLE t (price DECIMAL(65, 10));

Why this works

DECIMAL supports up to 65 digits of precision and up to 30 digits of scale.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1713 ER_INVALID_FIELD_SIZE

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors