My Oracle Support Banner

Not Able To TRUNCATE TABLE Due To "ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint" (Doc ID 1969005.1)

Last updated on MARCH 14, 2017

Applies to:

MySQL Cluster - Version 7.2 and later
MySQL Server - Version 5.5 and later
Information in this document applies to any platform.

Symptoms

Unable to TRUNCATE TABLE.

After initializing a crashed Data node, some of the tables cannot be truncated:

mysql> truncate table t1;
ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint ()
mysql> truncate table t3;
ERROR 1701 (42000): Cannot truncate a table referenced in a foreign key constraint ()

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.