mysql truncate具備外鍵約束的表報錯的解決[Err] 1701

使用這個語句使得外鍵約束失效 table  SET foreign_key_checks=0; select 而後使用truncate表 數據  truncate table breedlog;tab  select * from breedlog;ab 最後刪除表數據後要恢復外鍵約束  SET foreign_key_checks=1;
相關文章
相關標籤/搜索