Insert into 2 tables - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Insert into 2 tables

kkendapakkendapa Posts: 1Member
Hello, I'm new to and databases.

I'm trying to implement a simple application for practice. I created a web form to enter details of an employee. when the data is entered on button click the data should populate in 2 tables.

actually primary key of 1 table is the foreign key of the other. In my insert query how should write the query so tht once I insert into the first table I can put the value of the primary key(which is auto generated) in the second table as foreign key so tht i dont have to insert it manually?


Sign In or Register to comment.