- 删除所有外键
SELECT concat(‘alter table',table_schema,'
.’,table_name,’ DROP FOREIGN KEY ‘,constraint_name,’;’)
FROM information_schema.table_constraints
WHERE constraint_type=‘FOREIGN KEY’
AND table_schema=‘schema_name’;
mysql 语句
最新推荐文章于 2024-08-14 14:09:13 发布