AutoNumber
≈ 1 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented numeric counter. It may be used to create an identity column which uniquely identifies each record of a table. Only one AutoNumber is allowed in each table. The data type was called Counter in Access 2.0.
AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented numeric counter. It may be used to create an identity column which uniquely identifies each record of a table. Only one AutoNumber is allowed in each table. The data type was called Counter in Access 2.0.
Manipulation of counters using DDL
The following Data Definition Language (DDL) query creates an AutoNumber field with a start value and an increment: CREATE TABLE Table1 ( Field1 COUNTER ([beginning_number], [increment_number]), [...] ); This query resets the counter: ALTER TABLE Table1 ALTER COLUMN Field1 COUNTER(beginning_number, increment_number); An alternative method of resetting the counter is to drop column re-add it (this has the side effect of renumbering existing rows in the table): ALTER TABLE Table1 DROP COLUMN Field1; ALTER TABLE Table1 ADD Field1 COUNTER;
References
External links
Set Autonumber field using VBA
Text derived from https://en.wikipedia.org/w/index.php?oldid=1261382851 under CC BY-SA 4.0; modifications have been made.