I have 2 tables like this:
table1:
col1 | col2 | col3
a | A | 1
b | A | 2
b | A | 3
c | B | 2
...
table:
col1 | col2|
A | 1
A | 2
A | 3
A | 4
A | 5
B | 1
B | 2
B | 3
....
I'd liek to create a view to generate:
t1.col1 | t2.col1 | t2.col2
a | A | 2
a | A | 3
a | A | 4
a | A | 5
b | A | 1
b | A | 4
b | A | 5
c | B | 1
c | B | 3
pls teach me the sql statement.thank you
table1:
col1 | col2 | col3
a | A | 1
b | A | 2
b | A | 3
c | B | 2
...
table:
col1 | col2|
A | 1
A | 2
A | 3
A | 4
A | 5
B | 1
B | 2
B | 3
....
I'd liek to create a view to generate:
t1.col1 | t2.col1 | t2.col2
a | A | 2
a | A | 3
a | A | 4
a | A | 5
b | A | 1
b | A | 4
b | A | 5
c | B | 1
c | B | 3
pls teach me the sql statement.thank you