what is wrong with my create table SQL?

Posted by George2 on Stack Overflow See other posts from Stack Overflow or by George2
Published on 2009-06-21T10:24:16Z Indexed on 2010/05/02 17:38 UTC
Read the original article Hit count: 159

Filed under:
|
|

Hello everyone,

I am using SQL Server 2008 management studio to execute the following SQL statements, and here is the related error message from SQL Server management studio. Any ideas what is wrong?

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

Create TABLE [dbo].[BatchStatus](
    [BatchID] [uniqueidentifier] NOT NULL CONSTRAINT [PK_BatchStatus_ID],
    [BatchStatus] [int] NULL,
    CONSTRAINT [PK_BatchStatus_ID] PRIMARY KEY CLUSTERED 
    (
        [BatchID] ASC
    )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO



Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ','.
Msg 319, Level 15, State 1, Line 8
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.

thanks in advance, George

© Stack Overflow or respective owner

Related posts about sql-server-2008

Related posts about create