Reseed identity column in SQL Compact

纵然是瞬间 提交于 2020-01-10 19:42:30

问题


Is it possible to reset the identity column in a compact database? I'm finding lots of answers regarding standard SQL Server, but no definitive answer regarding if it is possible using SQL CE.

Dropping and recreating the table is not ideal in my scenario!

Thanks!


回答1:


ALTER TABLE [MyTable] ALTER COLUMN [Id] IDENTITY (1,1)


来源:https://stackoverflow.com/questions/15271143/reseed-identity-column-in-sql-compact

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