有个很简单的sql不会写,新人勿喷
tabe1
id_1 word
1 wenh
2 你好
3 hello
table2
id_2 id_1 word
1 1 aaaa
2 1 bbbb
3 1 cccc
我想得到一个表
table3
id_3 word
1 wenh
1 aaaa
1 bbbb
1 cccc
怎么写sql语句?
谢谢了
------解决方案--------------------规则是?????
------解决方案--------------------select a.id_1,a.id_1.word
from table2 a
union
select b.id_1,b.id_1.word
from table1 b ,table2 c
where b.id_2=c.id_1