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