dr223
1
Hi,
I have 2 tables TableA and TableB..
TableA
PatID (PK)
PatType
OrgID (FK)
OrgLocID (FK)
TableB
OrgID (PK)
OrgName
OrgAddress
I want to create a relationship where by I have 1 PK linking to 2 FKs, as shown above.
How can I achieve this ?
Thanks
so let's see your create table statements! Two FKs is no harder than one.
ALTER TABLE TableA ADD
CONSTRAINT TableA__FK_OrgID FOREIGN KEY REFERENCES TableB ( OrgID ),
CONSTRAINT TableA__FK_OrgLocID FOREIGN KEY REFERENCES TableB ( OrgID )