SQL70004: In this context, you must specify columns by using a CREATE TABLE statement instead of by using an ALTER TABLE statement

Visual Studio选择SQL Server Database project模板创建项目, 添加如下所示的更新脚本文件

ALTER TABLE [dbo].[Account] ADD
    [Name]      VARCHAR (50)    NOT NULL,
    [Password]  VARBINARY (100) NULL
GO

Visual Studio编译报错

SQL70004: In this context, you must specify columns by using a CREATE TABLE statement instead of by using an ALTER TABLE statement

解决办法:选中脚本文件,右键属性,修改编译属性:Build --> None,注意此处修改会更新项目文件

posted @ 2020-04-09 00:15  天琊蓝  阅读(472)  评论(0编辑  收藏  举报