# AutoIncrement Property
> Version: _Available or changed with runtime version 1.0._
Sets whether the field value should be automatically incremented.
## Applies to
 Table field
The fields must be of Integer Data Type<../methods-auto/library> and BigInteger Data Type<../methods-auto/library>.
## Property Value
True if the field value is automatically incremented; otherwise, false. The default value is false.
> NOTE
> If you want to manually assign a value to a field that has the AutoIncrement property set to true, you must be member of the SQL Server db_owner database permission set.
## Syntax
```al
field(4; D; Integer) { AutoIncrement = true; }
```
## Remarks
A table can only contain one auto-increment field. The numbers assigned to this field will not always be consecutive for the following reasons:
 If you delete some records from a table, the numbers used for these records are not reused.
 If several transactions are performed at the same time, they will each be assigned a different number. However, if one of these transactions is rolled back, the number that it was assigned is not reused.
If you add an auto-increment field to an existing table, the field automatically generates consecutive values and inserts them into the table. If you enable the AutoIncrement property for a field that already contains data, there must be no zero values in the field.
The AutoIncrement property is designed to always assign numbers automatically. If you want to insert a record, be sure that the value in this field is blank before you insert the record.
The AutoIncrement property does not work with Dynamics 365 Business Central temporary tables.
## Related information
devenv-properties

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-autoincrement-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-autoincrement-property/
