2017-06-19 73 views
0

好了,所以我試圖扭轉這個查詢,但我還沒有真正成功地做到了它在所有倒車內加入

好了,所以這是我的查詢

SELECT razlike.* FROM razlike INNER JOIN modeli ON modeli.model_id = razlike.FIELD3; 

現在,我想的是,它顯示我的結果它不能找到modeli.model_id的razlike表內

+0

的是,在razlike叫FIELD3? –

回答

0

還有就是做這件事:

SELECT razlike.* 
FROM razlike 
WHERE razlike.FIELD3 NOT IN (SELECT modeli.model_id FROM modeli); 

您可以用Left join也做到這一點,在情況下,你想從其他表字段有:

SELECT razlike.* 
FROM razlike 
LEFT JOIN modeli ON modeli.model_id = razlike.FIELD3 
WHERE modeli.model_id IS NULL;