Reputation: 37
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
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