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!

The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path

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

Leave a Reply

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

*
*