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

后端 未结 8 1335
陌清茗
陌清茗 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 18:13

    Type this .... SET foreign_key_checks = 0;
    delete your table then type SET foreign_key_checks = 1;

    MySQL – Temporarily disable Foreign Key Checks or Constraints

提交回复
热议问题