Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a primary key compound by two or more fie
Message
 
 
À
21/05/2001 11:58:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00509511
Message ID:
00509519
Vues:
17
>I need to create a primary key compound by two fields. I was trying to do that in the GUI but it doesn't work (i.e. Field1 + Field2).
>
>Then I found this in the MSDN Online library:
> ALTER TABLE MyTable ADD PRIMARY KEY Field1 tag Field1
>
>How can I to include two fields in the above statement?
>
>
>Thanks all!!!

ALTER TABLE MyTable ADD PRIMARY KEY Field1 + Field2 tag PK

See bold above. You can also keep the index tag name the same as Field1 but that could get confusing.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform