I think what you want tt do is: 1. Use a transaction to wrap your inserts.2. After you insert into Meals you can get the newly inserted ID my using SCOPE_IDENTITY(). (assuming it is an IDENTITY column)3. Then use that ID to associate the new Meal with the Calories table.For example (error handling omitted): DECLARE @ID INTBEGIN TRANSACTIONINSERT meals (meal_title, dsc, meal_time, datestamp) VALUES (@v_title, @v_dsc, @v_mealtime, @v_datestamp)SET @ID = SCOPE_IDENTITY()INSERT calories (mealsID, calories) VALUES (@ID, @v_calories)COMMIT TRANSACTION