You need to add data to two related tables with one query. I do a constructor, but there you can add only to one table, and in SQL I am zero!

  • one
    Why one? And not two in one transaction? - asianirish

1 answer 1

Insert into table1 values ​​(...); Insert into table2 values ​​(..., linked_key = @@ identity); ? and what for a DBMS?