执行时:
ALTER TABLE [dbo].[webpages_UsersInRoles] DROP CONSTRAINT [FK_dbo.webpages_UsersInRoles_dbo.webpages_Membership_UserId]
我收到一个错误:
'FK_dbo.webpages_UsersInRoles_dbo.webpages_Membership_UserId' is not a constraint.
Could not drop constraint. See previous errors.
这是我的webpages_UsersInRoles
桌子:
CREATE TABLE [dbo].[webpages_UsersInRoles] (
[UserId] INT NOT NULL,
[RoleId] INT NOT NULL,
PRIMARY KEY CLUSTERED ([UserId] ASC, [RoleId] ASC),
CONSTRAINT [fk_UserId] FOREIGN KEY ([UserId]) REFERENCES [dbo].[UserProfile] ([UserId]),
CONSTRAINT [fk_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [dbo].[webpages_Roles] ([RoleId])
);
我试着按照这个答案做,但它对我不起作用。