DOCUMENT:Q90959 30-DEC-1999 [foxpro] TITLE :INFO: Using INDEX ON UNIQUE to Create Unique Index PRODUCT :Microsoft FoxPro PROD/VER:MS-DOS:1.0,1.01,1.02,2.0,2.1,2.5,2.5a; WINDOWS:2.5,2.5a,5.0,6.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, versions 5.0, 6.0 - Microsoft FoxPro for MS-DOS, versions 1.0, 1.01, 1.02, 2.0, 2.5, 2.5a - Microsoft FoxPro for Windows, versions 2.5, 2.5a - Microsoft FoxBASE+ for MS-DOS, version 2.1 ------------------------------------------------------------------------------- The "INDEX ON TO | TAG 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. SUMMARY ======= Additional query words: VFoxWin FoxDos FoxWin 1.00 fox base tag ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbFoxproSearch kbZNotKeyword3 kbFoxPro200DOS kbFoxPro250DOS kbFoxPro250aDOS kbFoxPro250 kbFoxPro250a kbFoxBASE210DOS kbFoxBASESearch kbVFP500 kbVFP600 Version : MS-DOS:1.0,1.01,1.02,2.0,2.1,2.5,2.5a; WINDOWS:2.5,2.5a,5.0,6.0 Issue type : kbinfo ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1999.