我正在尝试执行此查询,但是当它与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行为空,非常混乱。
WITH在SQL Server 2000中仅允许FillFactor设置。请参阅文档:
WITH
FillFactor
http://msdn.microsoft.com/zh- cn/library/aa258255%28v=sql.80%29.aspx
从WITH子句中删除其他选项。