2
Answers

How to insert data in two dependent table through one query in C#

Rohatash Kumar

Rohatash Kumar

14y
2.6k
1
How to insert data in two dependent table through one query in C# ?
Answers (2)
0
matt cupryk
NA 29 0 14y
best way is to use datafilll
0
Suthish Nair
NA 31.7k 4.6m 14y

 you need to write two different insert statements for that.
 
 for eg:

 cmd.CommandText = "Insert into table1 (column1) values (@column1); Insert into table2 (column1) values (@column1);";