Cannot truncate a table referenced in a foreign key constraint mysql error

Cannot truncate a table referenced in a foreign key constraint mysql error

Trying to update the schema or truncating the table or something else and got this error?
Turn the constraint temporarily and the issue shall be fixed:

SET FOREIGN_KEY_CHECKES=0;
TRUNCATE TABLE somepoortable;
.
.
SET FOREIGN_KEY_CHECKS=1;

That is it!

AbstractSureFireMojo Class Missing Maven Surefire

Spring Data error: getOutputStream() has already been called for this response

No Persistence provider for EntityManager named Hibernate error

Java Tomcat error: can not access a member of class with modifiers

Add scrollbar to mysql result in terminal

You asked to pull from the remote but did not specify the branch github error

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*