1163
MariaDBERRORCommonDDLHIGH confidence

Incorrect table name

Production Risk

Low — DDL fails; no data loss.

What this means

ER_WRONG_TABLE_NAME (1163, SQLSTATE 42000) is raised when a table name contains invalid characters, is empty, or is otherwise syntactically invalid.

Why it happens
  1. 1Table name contains a slash, backslash, period, or other forbidden character
  2. 2Table name is empty
  3. 3Table name exceeds 64 characters
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE `my.table` (id INT);

expected output

ERROR 1163 (42000): Incorrect table name 'my.table'

Fix

Use only valid characters in table names

WHEN Always.

Use only valid characters in table names
CREATE TABLE my_table (id INT);

Why this works

Table names should use only letters, digits, and underscores; avoid dots, slashes, and other special characters.

What not to do

Use dots in table names expecting them to act as schema separators

In MySQL the dot separates the database from the table name (db.table); a dot inside a table name makes it invalid.

Sources
Official documentation ↗

MySQL 8.0 — 1163 ER_WRONG_TABLE_NAME

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

← All MariaDB errors