Insert New Record in forgin key table
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hello All, I have two tables First one has PK auto increment column and the second table Has FK I select the last inserted PK in the First table and insert it into the second table as FK. is there is any more professional way to do so or this is the correct way? Sms
-
Hello All, I have two tables First one has PK auto increment column and the second table Has FK I select the last inserted PK in the First table and insert it into the second table as FK. is there is any more professional way to do so or this is the correct way? Sms
If you're using SQLServer you can get the value of @@identity. It's a sql server var that gives you the value of the last autoincrement assigned.
Visit my blog at http://dotnetforeveryone.blogspot.com/