A primary key is an index that uniquely identifies each record in a table. It can be set for one and only one field, which is known as the primary key field. This field will not accept duplicate or blank values. If you have entered a duplicate value or left the field blank, you will not be able to move to the next or previous record until you change or delete the duplicate value or replace the blank with a unique value. Primary keys are useful when you use Ability Database to set up relations between tables.
In addition, the Primary Key field in a table automatically sorts the table into ascending order according to the values in the field. If you add extra records, they will be automatically ordered according to the Primary Key field when you close and re-enter the table.
Note: If you haven't set a primary key while designing a table, you can set it after records have been entered. However, if the field already contains duplicate values or if it contains blanks, then Ability will display an error message asking you to remove duplicates or to replace blanks with a unique value before it accepts the field as the primary key field. The primary key will not be set for a field with duplicate values or blanks and will format the field so that it has no index. If you can't edit the field to rid it of duplicate values, you can create an extra field and give it the Incremental data type. This will number all the records and ensure their uniqueness. Even when you delete records and add new ones, the new records will not be given numbers that have already been used. This is obviously useful as the basis of an invoice table, where invoices are required to be unique.
See: