Reply to Re: syntax error ALTER TABLE

Your name:

Reply:


Posted by Erland Sommarskog on 07/25/06 15:56

obastard (info@prognet.dk) writes:
> Having a problem with a ms sql 2000 server. The script below was
> created i SQL manager 2005 lite and gives a syntax error near '('
>
> ALTER TABLE [dbo].[Community_ActivityLog]
> ADD CONSTRAINT [PK_Community_Errors]
> PRIMARY KEY CLUSTERED ([activity_ID])
> WITH (
> PAD_INDEX = OFF,
> IGNORE_DUP_KEY = OFF,
> STATISTICS_NORECOMPUTE = OFF,
> ALLOW_ROW_LOCKS = ON,
> ALLOW_PAGE_LOCKS = ON)
> ON [PRIMARY]
> GO
>
> Any ideas of what might be wrong?

Whenever you get a syntax error you should consult the syntax diagram in
Books Online.

In this case, when you are using a tool for SQL 2005 and run the output
on an earlier version, you should suspect that the tool has generated
syntax which is new for SQL 2005. This is indeed the case here.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация