# Unique Property
> Version: _Available or changed with runtime version 3.0._
Sets a value that indicates whether a SQL Server unique constraint that corresponds to the key should be created.
## Applies to
 Table key
> NOTE
> The Unique property cannot be used in table extension objects.
## Property Value
true if the key value must be unique; otherwise, false. The default is false.
## Remarks
A unique index ensures that records in a table do not have identical field values. With a unique index, when a table is validated, values of the field that makes up the key are checked for uniqueness. If the table includes records with duplicate values for the field, the validation fails.
## Example
The following example defines a primary key and two unique secondary keys.
```al
keys
{
    key(PrimaryKey; ID)
    {

    }
    key(CustomerInfo; Name,Address,City)
    {
        Unique = true;
    }
   key(Email; Email)
    {
        Unique = true;
    }
}

```
## Related information
../devenv-table-keys

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-unique-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-unique-property/
