Insert Data in two table but the second table with FK

Jan 22 2016 4:46 AM
Hello C# Corner,
 
I want to insert Data in two table same time, but the second table consist Foreigner Key ID of the first table(Primary Key). 
 
sample tables are below;

User Table:

Id 
Name
Email Address 

Subscription Table:

· IIId

· User Id

· Activation Code

· Subscription Type

· Start Date

· End Date

· Subscription Scope

 
Please, Possible someone to help me with T-SQL code or Explanation. Thanks,
Beavon 
 


·

 

Answers (1)