I have a set of SQL tables that looks like
create table foo (
id int primary key asc,
data datatype );
create table bar (
id int primary key asc,
fk_foo int,
foreign key(foo_int) references foo(id));
Now I want to insert a recordset.
insert into table foo (data) values (stuff);
But wait, to get Bar, all fixed hunkydory I need a PC from Foo. I know this is a problem.
What's the solution?
source
share