Auto Generated - CREATE Table Script in SQL 2008 throws error
- by jack
I scripted the tables in my dev database using SQL 2008 - generate scripts option (Datbase-right click-Tasks-Generate Scripts) and ran it on the staging database, but the script throws the below error for each table
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '('. Msg 319,
Level 15, State 1, Line 15 Incorrect
syntax near the keyword 'with'. If
this statement is a common table
expression, an xmlnamespaces clause or
a change tracking context clause, the
previous statement must be terminated
with a semicolon.
Below is the script for one of my table
ALTER TABLE [dbo].[Customer](
[CustomerID] [int] IDENTITY(1,1) NOT NULL,
[FirstName] [nvarchar](500) NULL,
[LastName] [nvarchar](500) NULL,
[DateOfBirth] [datetime] NULL,
[EmailID] [nvarchar](200) NULL,
[ContactForOffers] [bit] NULL,
CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED
(
[CustomerID] 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
Any help will be much appreciated.