给定 2 个表,TableA 和 TableB,当“值”与 TableB 的任何“值”都不匹配时,如何获取 TableA 的“id”?
表 A
+----+-------+
| id | value |
+----+-------+
| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
+----+-------+
表 B
+----+-------+
| id | value |
+----+-------+
| 1 | a |
| 2 | b |
| 3 | c |
| 4 | c |
| 5 | f |
+----+-------+
结果表
+----+
| id |
+----+
| 4 |
| 5 |
+----+
已编辑(SQLFiddle): http ://sqlfiddle.com/#!2/4c8c9