Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary key
Message
From
18/10/2007 17:46:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01261997
Message ID:
01262008
Views:
16
>How to create a primary or candidate KEY ?
>
>VFP help is not clear about this issue
>
>Moises

Primary keys are defined through indices (indexes).

In the table structure, for example, with MODIFY STRUCTURE, click on the field, and select an ascending index in the corresponding combobox. Then go to the "Index" section, and define the index as primary, or candidate.

You can also create an index directly in the "index" section. You may have to do this if an index doesn't exactly correspond to a field, but rather, is a combination of more than one field.

I suggest you also read my introductory article on primary keys, to learn about different strategies for creating primary keys. Universal Thread Magazine, May 2002.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform