------解决方案--------------------
delete from A where id=1; delete from B where aid=1; .........................
------解决方案--------------------
------解决方案--------------------
在所有表的 aid 上建索引 在循环中逐个操作
如果都是 InnoDB 类型表 那么在除 A 外的表的 aid 上建 A.id 的外键 只 delete from A where id=1 即可
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn