I have the following tables in Oracle:
Table 1 Table 2 AllCustomers ProductCode Customers 5200000 ABC 15265 DEF 156890 In Oracle, I want to join them both, like this:
Table 3 ProductCode Customers AllCustomers ABC 15265 5200000 DEF 156890 5200000 How can I join these tables? As you can see, they do not have a key field to join. I just need to populate a third column in the new table with the same value in it, which would be the one from AllCustomers. Thanks in advance!
select * from table2 cross join table1- but if Table 1 has multiple rows, the result will repeat Table 2 several times, once for each row in Table 1.