How can I copy data from one table (table A) to another (table B) repeating that data for all records in Table A for each ID in table C.
Lets say i have table_a contains 100 records. Table b is empty and has a similar structure to table a (same datatypes, different column names). Table C has 5 records. I want to copy each record in table a into table b 5 times. Each of those times using a id from table c. So table b will end up with 100 x 5 records (500).
You can just use a full join for this:
You can, of course, use
INSERT INTO cinstead, the same principle applies.