Dear programmers;
I have the follwing:
Create table CHILD
(
UNIQUEIDENTIFIER CID PRIMARY KEY,
fNAME VARCHAR(25),
LNAME VARCHAR(50),
)
Create table Parent
(
UNIQUEIDENTIFIER PARID PRIMARY KEY,
fNAME VARCHAR(25),
LNAME VARCHAR(50),
UNIQUEIDENTIFIER CID FOREIGN KEY REFERENCES(cHILD) CID
)
i have details of a parent and that of the parent's child.
need to save the PK of the child table into the parent table.
the input( details) come from a windows form application
How do i achieve this USING STORED PROCEDURES ?
How to save a foreign key to another table
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Suthish NairRank #92 · 22.8K reputationPosted Jun 27, 2011, 4:16 AM EDT
Pradeep ChandrakerRank #941 · 2.2K reputationPosted Jun 27, 2011, 5:10 PM EDT