1
Table1
F1 F2 F3 F4
ab1 bc1 de1 5
ab2 bc2 de2 6
ab3 bc3 de3 0
Table2
F21 F22 F23
5 five d
6 six e
Table3
f31
ab1
ab2
ab3
select a.f1 a.f2 b.f22 from Table1 as a Table2 as b Table3 as c
where a.f1 = c.f31 and a.f4 = b.f21
我要尋找的結果左連接是解決方案嗎?
AB1 BC1 5
AB2 BC2性
AB3 BC3 「」
我不知道該怎麼問這個。但我的問題是,如果a.f4 = b.f21不matcheed,這意味着
0是不是在表3中,但仍然我想結果與空值..如何實現這一目標?
使用LEFT JOIN。 http://hashmysql.org/index.php?title=Introduction_to_Joins – Naktibalda 2010-07-22 16:24:10