Search code examples
sqlsql-server-ce

Reseed identity column in SQL Compact


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!


Solution

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