I currently have two tables which they do not have anything in common, and I would like to get data from both tables and insert it into the 3rd table.
table A
CustomerId | CustomerName | PhoneNumber
table B
ProductId | ProductName | priceA | PriceB | PriceC
table C
id | customerID | productID
The problem now is that whenever I insert a new product (table B), I would like to have it assign to each customer (table A)
So let says
table A
c1 | aa | 1234 c2 | bb | 3456 c3 | cc | 3123
and table B
p1 | candy | 1.1 | 1.2 | 1.3 p2 | bag | 5.5 | 5.6 | 5.7 p3 | key | 3.3 | 3.1 | 3.5
and I would like it to have each customer assigned to all products like the following:
table C
1 | c1 | p1 2 | c1 | p2 3 | c1 | p3 4 | c2 | p1 5 | c2 | p2 6 | c2 | p3 7 | c3 | p1 8 | c3 | p2 9 | c3 | p3
can I please get any suggestion of how i should do this. my original thought was to use JOIN, but there is nothing in common that I can join, is there a better and faster way to do this?
