我在 Visual Studio 2012 Server Explorer 中使用 New Query 窗口。这是我要执行的脚本:
ALTER TABLE [dbo].[webpages_UsersInRoles] DROP CONSTRAINT fk_UserId;
ALTER TABLE [dbo].[webpages_UsersInRoles] DROP CONSTRAINT fk_RoleId;
DROP TABLE [dbo].[ExtraUserInformation];
DROP TABLE [dbo].[UserProfile];
DROP TABLE [dbo].[webpages_Membership];
DROP TABLE [dbo].[webpages_OAuthMembership];
DROP TABLE [dbo].[webpages_Roles];
DROP TABLE [dbo].[webpages_UsersInRoles];
CREATE TABLE [dbo].[ExtraUserInformation] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[UserId] INT NOT NULL,
[FullName] NVARCHAR (MAX) NULL,
[Link] NVARCHAR (MAX) NULL,
[Verified] BIT NULL,
CONSTRAINT [PK_dbo.ExtraUserInformation] PRIMARY KEY CLUSTERED ([Id] ASC)
);
目前没有 pages_UsersInRoles 表,它给了我一条错误消息:
Msg 4902, Level 16, State 1, Line 5
Cannot find the object "dbo.webpages_UsersInRoles" because it does not exist or you do not have permissions.
在此消息之后,脚本似乎停止并且在此之后无法创建其他表。在脚本通过预期的错误后,我可以让脚本继续吗?