Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key to Primary Key relationship
Message
De
05/01/2001 10:03:12
 
 
À
05/01/2001 08:47:00
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:
00459790
Vues:
25
>Guess I should have tried that, but the docs clearly say this is for one to many relationships. Thanks.

Hmm. Further examination of the ALTER TABLE docs, and a test program later,
I did this:
CLOSE DATABASES ALL
CLOSE TABLES ALL
create database c:\crap\test
open database c:\crap\test

CREATE TABLE MyTable1 (id  I PRIMARY KEY, name C(10))

CREATE TABLE MyTable2 (id  I  PRIMARY KEY, othername C(10))

USE MyTable2 excl

ALTER TABLE MyTable2 ALTER COLUMN id I PRIMARY KEY REFERENCES MyTable1 

CLOSE DATABASES ALL
CLOSE TABLES ALL
Jim Newsom
IT Director, ICG Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform