How can I drop a table if there is a foreign key constraint in SQL Server?

后端 未结 8 1329
陌清茗
陌清茗 2020-12-15 17:43

I have the following:

DROP TABLE [dbo].[ExtraUserInformation];
DROP TABLE [dbo].[UserProfile];
DROP TABLE [dbo].[webpages_Membership];
DROP TABLE [dbo].[webp         


        
8条回答
  •  醉酒成梦
    2020-12-15 17:50

    You must drop the constraint before you can drop the table.Other wise its rule violation. How to get foreign key relationships see this old question. SQL DROP TABLE foreign key constraint

提交回复
热议问题