0
tableA tableB IdPrice price id tax IdPrice ---------------------- ------------------------------------ 4 100 1 20 4 ------------------------ ------------------ ------------------ 5 150 2 10 6 ------------------------ ------------------ ------------------ 6 270 ------------------------ result = price id tax ---- --- ---- 100 1 20 150 2 10 270 null null my Query SELECT price,id,tax FROM tableB INNER JOIN tableA ON tableA.IdPrice= tableB.IdPrice but this result price id tax ---- --- ---- 100 1 20 150 2 10
將'inner join'更改爲'left join'。請花些時間閱讀http://stackoverflow.com/help/how-to-ask – HoneyBadger
它不是簡單地將內部連接更改爲左連接。 。你需要切換表連接sequnce也 – Squirrel
哈哈,所以把它改爲'右外連接'。然後它不需要切換表連接序列。 – Kason