SQL Server CE 3.5 AutoIncrement
-
Hello, I've googled far and wide and this is one of those rare things I just can't seem to find an answer for. Hopefully it's easy, but this is my first time ever playing with SQL Server CE and the answer eludes me. All I want to do is reset my AutoIncrement column back to 1 when I clear the table. DBCC CHECKIDENT apparently is not supported in CE and I can't find a way to do it. Can anyone help? Thanks much.
-
Hello, I've googled far and wide and this is one of those rare things I just can't seem to find an answer for. Hopefully it's easy, but this is my first time ever playing with SQL Server CE and the answer eludes me. All I want to do is reset my AutoIncrement column back to 1 when I clear the table. DBCC CHECKIDENT apparently is not supported in CE and I can't find a way to do it. Can anyone help? Thanks much.
-
Try ALTER TABLE command like following:
ALTER TABLE TableName ALTER COLUMN ColumnName IDENTITY(1,1)
The need to optimize rises from a bad design. My articles[^]