Using INDEX ON <Tag> UNIQUE to Create Unique Index

ID: Q90959

1.x 2.00 2.50 2.50a | 2.50 2.50a 3.00

MS-DOS              | WINDOWS
kbprg

The information in this article applies to:

The "INDEX ON <field> TO <idx_file> | TAG <tagname> UNIQUE" command creates an index in which only one record appears for each key value in the database.

The UNIQUE qualifier specifies that only the first record with a particular index key is included in an IDX or CDX index tag. You can use a UNIQUE index to prevent access or display of duplicate records because all subsequent records with the same index keys are excluded from the index file.

Using the UNIQUE qualifier in the INDEX command has the same effect as issuing the SET UNIQUE ON command before issuing the INDEX or REINDEX command. If a key is deleted, it is removed from the index, even if the file contains other occurrences of the deleted key.

Additional reference words: VFoxWin 3.00 FoxDos FoxWin 1.00 1.01 1.02 2.00 2.50 2.10 2.50a fox base tag KBCategory: kbprg KBSubcategory: FxprgGeneral

Keywords          : FxprgGeneral 
Version           : 1.x 2.00 2.50 2.50a | 2.50 2.50a
Platform          : MS-DOS WINDOWS

Last Reviewed: April 30, 1996