Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

IDENTITY Property (SQL Server Compact Edition)

Creates an identity column in a table. This property is used with the CREATE TABLE and ALTER TABLE statements.


IDENTITY [ (seed,increment) ]

seed

The value that is used for the first row loaded into the table.

increment

The incremental value that is added to the identity value of the previous row that was loaded.

Note:
You must specify both the seed and increment, or neither. If neither is specified, the default is (1,1).

In Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition), the IDENTITY property can be created only on a column of data type integer or bigint. A table can have only one IDENTITY column.

This example creates a two-column table in which the first column is an IDENTITY column.

CREATE TABLE MyCustomers (CustID int IDENTITY (100,1) PRIMARY KEY, CompanyName nvarchar (50))

Community Additions

ADD
Show:
© 2015 Microsoft