Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Insert into 2 tables

kkendapakkendapa Posts: 1Member
Hello, I'm new to asp.net 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.