jon
jon

Reputation: 37

SQL Ce 4 - How can I run DBCC CHECKIDENT

I want to run DBCC CHECKIDENT on a SqlCe4 database but it wont let me.

I need to reset the identity column as its messed up. I think because IDENTITY was turned off, an import of data was done and then IDENTITY turned on again so I guess its out of sync

Upvotes: 0

Views: 7777

Answers (1)

Darryl Peterson
Darryl Peterson

Reputation: 2270

There is no DBCC CHECKIDENT in SQL CE 4.

You need to use ALTER TABLE.

ALTER TABLE [MyTable] ALTER COLUMN [IdentityColumn] IDENTITY (999,1).

Upvotes: 3

Related Questions