1

I have 2 tables with same column in each.. Lets call it colors. How do I compare the two to show the unique colors in table B that are not in table A?

4

2 回答 2

1
select b.color
  from tbl1 b
 where not exists (select * from tbl2 a where b.color=a.color)
于 2012-11-03T22:57:25.697 回答
1
SELECT b.color AS color FROM tableB b
LEFT JOIN tableA a ON a.color = b.color
WHERE a.color IS NULL;
于 2012-11-03T23:00:16.640 回答