1344
MariaDBerrorddlhigh confidence

A table must have at least 1 column

Production Risk

Low — DDL fails; no data affected.

What this means

CREATE TABLE was issued with an empty column definition list.

Why it happens
  1. 1CREATE TABLE t (); — empty parentheses
  2. 2Programmatically generated SQL that produced an empty column list
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t ();

expected output

ERROR 1344 (42000): A table must have at least 1 column

Fix

Add at least one column

Add at least one column
CREATE TABLE t (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY);

Why this works

Every table requires a minimum of one column definition.

Sources
Official documentation ↗

MySQL 8.0 — 1344 ER_TABLE_MUST_HAVE_COLUMNS

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

← All MariaDB errors