mainrotor
asked on
Need help writing 2 Insert Query Scripts in SQL Server 2012
Hi Experts,
If I have two tables I need to write insert scripts for in SQL Server 2012, but the second table's has a foreign key field which is the Auto Generated ID of the first table, how would I write my scripts? Is there an easy way of doing this?
Thanks in advance,
mrotor
If I have two tables I need to write insert scripts for in SQL Server 2012, but the second table's has a foreign key field which is the Auto Generated ID of the first table, how would I write my scripts? Is there an easy way of doing this?
Thanks in advance,
mrotor
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Pawan.
I will try your suggestion, but it looks like it should work just by looking at it.
mrotor
I will try your suggestion, but it looks like it should work just by looking at it.
mrotor
Kinda hard to give an answer otherwise.