I have a table in my database in which each row has a parent identifier, which is the identifier of another row in the table (the table represents a tree structure). I would like to clear the table. But when I do
DELETE FROM table_name WHERE true;
I get an error (foreign key constraint). How do I care about discrediting the table?
Clarification: I want to delete the entire contents of the table, not the tables themselves.
source
share