I'm trying to write a "simple" INSERT comand in SQL.
INSERT TABLE_A (COLUMN_1_TABLE_A, COLUMN_2_TABLE_A, COLUMN_3_TABLE_A)
VALUES (@variable_1, @variable_2, (SELECT * FROM TABLE_B))
Now, TABLE_B has one column and a variable number of rows. How can I loop through all TABLE_B rows using its values for all the inserts?