I understand how to copy a column from one table into another, but I need to do that + also define the values of extra columns in table2 according to local variables within my stored procedure.
Is there a way to do this in one go? Thanks so much for the help!
If I understand your question correctly, you can simply select the variables’ values inline with the columns from the second table, like so: