How to create Auto Number Field in access?
Create table table1 (RecordNo autonumber, personid varchar(50)…)
But it showing error.
How can I make a query in the access?
How to create Auto Number Field in access?
Create table table1 (RecordNo autonumber, personid varchar(50)…)
But it showing error.
How can I make a query in the access?
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)
)
The MS Access uses the
AUTOINCREMENT
keyword to perform an auto-increment feature.By default, the starting value for
AUTOINCREMENT
is 1, and it will increment by 1 for each new record.To specify that the "
P_Id
" column should start at value 10 and increment by 5, change the autoincrement toAUTOINCREMENT(10,5)
.
Method 1:
Method 2: