Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key to Primary Key relationship
Message
De
04/01/2001 16:27:07
 
 
À
04/01/2001 15:56:27
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00459550
Message ID:
00459567
Vues:
23
>The documentation seems to say that I can set a 1 to 1 relationship between tables with the command "Alter Table table1 references table2". However this gives me a syntax error, as does "alter table table1 references table2 tag mytag". Can anyone tell me what the syntax of the command to establish a 1 to 1 relationship between 2 tables with primary keys in a DBC? Thanks.

The References keyword seems to only work with a Foreign Key clause, however, since mytag is already the primary key, it will simply add the reference and not overwrite the tag or create another one. This should work (at least, it did for me):
Alter Table table1 Add Foreign Key Tag mytag References table2 Tag mytag
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform