我正在尝试执行此查询,但是当它与SQL Server 2005完全罚款并且表已经存在并尝试在不同的服务器上创建新表时会出现语法错误,
USE [myDataBase]
GO
CREATE TABLE [dbo].[myTable]
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[Tittle] [varchar](1024) NOT NULL,
[Description] [varchar](8000) NOT NULL,
[Table2ID] [int] NOT NULL,
[Table3ID] [int] NOT NULL,
CONSTRAINT [PK_myTable] PRIMARY KEY CLUSTERED
(
[ID] ASC
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
GO
错误
消息170,级别15,状态1,行16行16:语法不正确 '('
在上面的例子中,第16行是空的,我很困惑。
答案 0 :(得分:5)
WITH
仅允许设置FillFactor
。请参阅文档:
http://msdn.microsoft.com/en-us/library/aa258255%28v=sql.80%29.aspx
从WITH
子句中删除其他选项。