添加Foregin约束的问题 [英] Problem with adding Foregin Constraints
问题描述
大家好,
我有一个现有的表(最多80个表)...我已经对12个表进行了分区,对于这些表,我删除了数据并删除了约束....现在我非常成功地为12个表添加了分区.现在我尝试为这些表添加了约束...我非常成功地添加了主键.但是我无法向这12个分区表中添加外键....
给出错误代码:1005:无法创建表"Schema_name".
注意:我试图从模型(逆向工程师)同步到源...但是仍然有同样的问题.
请帮我解决这个问题...
在此先感谢.
Hi All,
I have an existing tables (up to 80 tables)... i have done partitions on 12 tables ,for those tables i delete the data and drop the constraints....now i added partitions for 12 tables very successfully.now i try to added constraints for those tables...i added primary keys very successfully.but i am unable to add foreign keys to those 12 partitioned tables....
gives an error code:1005:Can''t create table ''Schema_name''.
Note: i tried to Synchronize from model(reverse engineer) to source...but still i have same problem.
Plz help me out of this problem...
Thanks in Advance.
推荐答案
检查此帖子以了解已知原因
MySQL错误号1005无法创建表 [ ^ ]
Check this post for known causes
MySQL Error Number 1005 Can’t create table[^]
这篇关于添加Foregin约束的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!