How can I alter a table in SQL Server Compact Edition (SQL CE)?
I have an existing table, and I need to add an IDENTITY
column.
You add a column in the same way you would add it in other versions of SQL Server:
This adds a primary key identity column called IdColumnName
to the table tableName
:
ALTER TABLE tableName
ADD COLUMN IdColumnName INTEGER IDENTITY (1,1) PRIMARY KEY
See the ALTER TABLE
syntax for SQL Server compact edition.