๋ฌธ์ ๋ฐ์ ์ํฉ
Error Code: 1701. Cannot truncate a table referenced in a foreign key constraint
SET FOREIGN_KEY_CHECKS=0;
SET FOREIGN_KEY_CHECKS=1;
//์ธ๋ํค ์ฒดํฌ X
set FOREIGN_KEY_CHECKS = 0;
//ํ
์ด๋ธ ์ญ์
truncate ํ
์ด๋ธ๋ช
;
//ํ
์ด๋ธ ์ญ์ ํ, ์ธ๋ํค ์ฒดํฌ O
set FOREIGN_KEY_CHECKS = 1;