Wednesday, March 21, 2012

Parse error

Can anyone tel lme why this does not parse in 2000 but works fine in 2005?

ALTER TABLE Segments ADD CONSTRAINT

PK_Segments PRIMARY KEY CLUSTERED

(

SegmentsUniqueID

) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,

ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

thanks

The WITH options cannot be set like this in SQL Server 2000. The ALLOW_ROW_LOCKS and ALLOW_PAGE_LOCKS options for example cannot be used like this, you need the sp_indexoption for that (however these are on by default).

No comments:

Post a Comment