SQL Ce 4 - How can I run DBCC CHECKIDENT

南笙酒味 提交于 2019-12-12 06:03:52

问题


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


回答1:


There is no DBCC CHECKIDENT in SQL CE 4.

You need to use ALTER TABLE.

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



来源:https://stackoverflow.com/questions/6284485/sql-ce-4-how-can-i-run-dbcc-checkident

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!