2011-10-22 25 views
0

我有兩個表,Arb_Total和AwardsPlayers。兩個表共享列playerID。我想將從AwardsPlayers的列獎ID添加到Arb_Total,通過playerID鏈接。問題是隻有Arb_Total中的少數玩家在AwardsPlayers中獲得任何獎勵。當並非所有數據點匹配時合併mySQL中的數據

當我運行類似的代碼:

select * 
from Arb_Total a, AwardsPlayers w 
where a.playerID = w.playerID 

我只能從球員誰獲獎結果。我如何讓球員與他們贏得的獎勵相匹配,同時讓所有沒有獲得獎勵的球員保留下來?

回答