I used the SQL Server management studio on a table with Create Script to New and did minor changes. Give me an error ‘Incorrect syntax near ‘(” for the ‘(‘ after ‘WITH’
/* EventType Table Creation */ CREATE TABLE [EventType] ( [pkEventID] [int] IDENTITY(1,1) NOT NULL, [Description] [nvarchar](50) NOT NULL, [BeginDate] [datetime] NOT NULL, [EndDate] [datetime] NOT NULL, [Comments] [nvarchar](500) NOT NULL, CONSTRAINT [PK_EventType] PRIMARY KEY CLUSTERED ( [pkEventID] ASC ) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY] ) ON [PRIMARY] GO
Which version of Microsoft SQL Server are you executing this
CREATE TABLEstatement against? According to documentation, MS SQL Server 2000 does not recognize the syntax forWITH (...index options...). That syntax is supported in MS SQL Server 2005 and later.Even if you use SQL Managment Studio 2005, you may be connecting to MS SQL Server 2000. To verify the version, try this query:
MS SQL Server 2000’s
productversionis 8.x.MS SQL Server 2005’s
productversionis 9.x.MS SQL Server 2008’s
productversionis 10.x.