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.