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.
keys
{
key(PrimaryKey; ID)
{
}
key(CustomerInfo; Name,Address,City)
{
Unique = true;
}
key(Email; Email)
{
Unique = true;
}
}
See Also
Commentaires
https://aka.ms/ContentUserFeedback.
Prochainement : Tout au long de l'année 2024, nous supprimerons progressivement les GitHub Issues en tant que mécanisme de retour d'information pour le contenu et nous les remplacerons par un nouveau système de retour d'information. Pour plus d’informations, voir:Soumettre et afficher des commentaires pour