简体   繁体   中英

Query works in SQL Server 2005 but syntax error for SQL Server 2000

I am trying to execute this query but getting syntax error when it perfectly fines with SQL server 2005 and table is already there and am trying to create new table on a different server,

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

Error

Msg 170, Level 15, State 1, Line 16 Line 16: Incorrect syntax near '('.

In above example, Line 16 is empty and am so confused.

WITH in SQL Server 2000 allows only FillFactor to be set. See the documentation:

http://msdn.microsoft.com/en-us/library/aa258255%28v=sql.80%29.aspx

Remove other options from the WITH clause.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM