Cid Name Address ProductId
1 a b 1
2 c d 2
Oid productid productname cost
1 1 Washing machine 15,000
2 2 TV 8,000
Quote:Product Id in child should be Foreign key.
Insert row to parent table.Get max(ProductId), then insert all rows in child with the Product Id retrieved from parent table after insertion of first row in parent table.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)