本文介绍了如何知道sql server数据库的外键&主键清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


因为我需要知道数据库的外键和主键列表,因为我当时需要从database1插入到database2,所以我需要将外键,主键从database2删除,以便我可以插入数据库的之后,我需要重新创建密钥

注意:我得到了有关外键列表的查询,但是当我当时尝试删除外键时,出现主键引用错误

Hi ,
As i need to know the database Foreign keys & Primary keys list due to i need to insert from database1 to database2 at that time i need to drop the Foreign keys, Primary keys off the database2 so that i can insert the Data''s of database1 after that i need to recreate the keys

Note : i got the query for foreign keys list but when i try to drop Foreign keys at that time i getting primary key reference error

thanking you for your help soon!!

推荐答案



这篇关于如何知道sql server数据库的外键&主键清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 18:00