sql - Which kind of join do I need to use here? -
for every row in table y, need copy of current row in table x, taking field 1 table y.
thanks in advamce!
table x
field 1 field 2 null null b null c
table y
field 1 1 2 3
desired output
field 1 field 2 1 1 b 1 c 2 2 b 2 c 3 3 b 3 c
looks cross join
:
select y.field1, x.field2 x cross join y;
Comments
Post a Comment