Results 1
Zac
Dave
Ned
Results 2
Eric
Mark
Zac
這是選擇查詢的輸出。MySql Union僅返回BOTH中的值
select names from table where id=1 UNION select names from tables where id=2;
我想從這兩個結果中包含的結果中選擇全部。聯盟返回所有名稱(Zac只有一次)。我如何獲得查詢只返回Zac?
您正在尋找*路口*,而不是工會。看到這個問題:[在MySQL中相交](http://stackoverflow.com/questions/2621382/intersect-in-mysql) – 2013-03-20 17:18:49