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,注意此处修改会更新项目文件

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

上一篇:Django_数据库——ORM对象操作


下一篇:mysql 创建 存储函数 split_string