'Join 2 ambiguous SQL tables
I have 2 tables that I want to join, when I try it gives me error of "ambiguous" the thing is both tables after joining them should generate new rows since values will match more than 1 time.
table_1
| row_a | row_b | row_c |
|---|---|---|
| abc | True | 1992 |
| abc | False | 1992 |
table_2
| row_c | row_d | row_e |
|---|---|---|
| 1992 | old | expired |
| 1992 | new | recent |
I want to join them and create
| row_a | row_b | row_c | row_d | row_e |
|---|---|---|---|---|
| abc | True | 1992 | old | expired |
| abc | True | 1992 | new | recent |
| abc | False | 1992 | old | expired |
| abc | False | 1992 | new | recent |
It has to be in SQL create new table, no python or anything else like it. In reality the code needs to join based on 2 columns.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
