SQL80001:')附近的语法不正确

时间:2016-05-21 06:30:48

标签: sql-server tsql visual-studio-2013

我已经在Stackoverflow上看到很多类似的问题已经关闭,但我希望我的问题有一个解决方案。

我的T-SQL代码如下:

this.FabricCanvas.contextContainer

我的错误:

CREATE TABLE [dbo].AccountItem
(
    [Id] INT NOT NULL PRIMARY KEY IDENTITY, 
    [AccountId] INT NOT NULL, 
    [ItemId] INT NULL, 
    CONSTRAINT [AccountFK] FOREIGN KEY (AccountId) REFERENCES Accounts(Id), 
    CONSTRAINT [ItemFK] FOREIGN KEY (ItemId) REFERENCES Item(Id)
)

我已经在其他人的网络上看到过"改变目标平台'""但我无法在项目属性中找到该部分。

我有VS2013 for Windows Desktop。

提前致谢!

1 个答案:

答案 0 :(得分:0)

试试这个

CREATE TABLE [dbo].[AccountItem](
[id] [int] IDENTITY(1,1) NOT NULL,
[AccountId] [int] NOT NULL,
[IitemsId] [int] NULL,
CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED 
[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF,         

ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
CONSTRAINT [AccountFK] FOREIGN KEY (AccountId) REFERENCES Accounts(Id), 
CONSTRAINT [ItemFK] FOREIGN KEY (ItemId) REFERENCES Item(Id)
) ON [PRIMARY]