SELECT DISTINCT a.field FROM table1 a UNION SELECT distinct b.field FROM table2 b
两位说的还是有点小问题,我认为应该是SELECT DISTINCT a.field FROM table1 a where a.field not in (select b.field from b) UNION SELECT distinct b.field FROM table2 b where b.field not in (select a.field from a)
UNION
SELECT distinct b.field FROM table2 b
UNION
SELECT distinct b.field FROM table2 b where b.field not in (select a.field from a)