1695
MySQLERRORNotablePartitioningHIGH confidence

PARTITION clause used on a non-partitioned table

Production Risk

Low — query fails; no data affected.

What this means

A PARTITION clause was supplied in a DML statement targeting a table that is not partitioned.

Why it happens
  1. 1Using INSERT INTO t PARTITION (p0) ... or SELECT ... FROM t PARTITION (p0) on a non-partitioned table.
How to reproduce
trigger — this will error
trigger — this will error
SELECT * FROM orders PARTITION (p0);

expected output

ERROR 1695 (HY000): PARTITION () clause on non partitioned table.

Fix

Remove the PARTITION clause

Remove the PARTITION clause
SELECT * FROM orders;

Why this works

Without partitioning the PARTITION clause is invalid and must be removed.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1695 ER_PARTITION_CLAUSE_ON_NONPARTITIONED

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

← All MySQL errors