Insert into 2 tables with PK FK relationship

The simplest way to populate your database with test data.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, Lionel, Emma A, sherr

Insert into 2 tables with PK FK relationship

Postby task » Mon Nov 07, 2011 10:39 am

I am trying to insert 1 record of data into 2 tables - the first table assigns the user a person_id and I want then for this person_id to link the 2 tables and the record to have a relationship through this id. At the moment when I go to generate the data 2 rows are inserted with 2 different person_id.

Any help would be much appreciated........
task
 
Posts: 2
Joined: Mon Nov 07, 2011 10:30 am

Postby Chris.Allen » Tue Nov 08, 2011 2:32 pm

have you tried assigning it as the foreign key generator?
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to SQL Data Generator 2

Who is online

Users browsing this forum: No registered users and 0 guests