Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果有人想关闭外键检查,则使用语句“SET FOREIGN_KEY_CHECKS = 0”。是否有一个 MySQL 语句来关闭所有主键检查。
您可以使用 禁用 MyISAM 表中的非唯一键ALTER TABLE ... DISABLE KEYS,但不能关闭主键和唯一键,除非您从表中删除它们。
ALTER TABLE ... DISABLE KEYS