"Empty table"-command with foreign key
I have two MySQL tables. Table A points to table B via foreign key. If I use "empty table" in HeidiSQL on table B, a TRUNCATE TABLE statement is executed. This statement then fails if FOREIGN_KEY_CHECK ist enabled.
My suggestion: check if a foreign key points to the table (info available in information_schema) and use the slower DELETE TABLE statement instead.
Otherwise a second menu-option (perhaps in a submenu like the one at "create new") to choose between TRUNCATE and DELETE would be nice.
Please login to leave a reply, or register at first.