Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key to Primary Key relationship
Message
From
05/01/2001 10:03:12
 
 
To
05/01/2001 08:47:00
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00459550
Message ID:
00459790
Views:
24
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform