4137
MariaDBERRORCriticalHIGH confidence
Row count mismatch in table value constructor
Production Risk
Low — The statement fails; no data is inserted.
Why it happens
- 1A VALUES() clause in an INSERT or a standalone table value constructor has rows with inconsistent column counts.
Fix
Ensure all rows in the VALUES clause have the same number of columns
Ensure all rows in the VALUES clause have the same number of columns
INSERT INTO t (a, b) VALUES (1, 2), (3, 4);
Why this works
All value rows must match the column list in count.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 4137 ER_TABLE_VALUE_CONSTRUCTOR_ROW_COUNT_MISMATCH2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev