According to SQL Auto Increment a Field :
CREATE TABLE Persons ( P_Id PRIMARY KEY AUTOINCREMENT, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255) )
MS Access uses the AUTOINCREMENT keyword to automatically increase the feature.
By default, the initial value for AUTOINCREMENT is 1, and this will be an increase of 1 for each new record.
To indicate that the column " P_Id " should begin with a value of 10 and an increment of 5, change the auto increment to AUTOINCREMENT(10,5) .
Synonyms for AUTOINCREMENT include COUNTER and IDENTITY . Using IDENTITY is important because it matches the @IDENTITY variable, which returns the last used autonumber value.
Eugene yokota
source share