与内连接查询相反
表 1 2 列:ID、名称
表 2 2 列:ID、名称
用于显示表 1 中但不在表 2 中的名称的查询是什么?因此,过滤掉表 1 中表 2 中的所有名称即可得到结果查询。过滤是根据 ID 而不是名称。
Table 1 2 columns: ID, Name
Table 2 2 columns: ID, Name
What is a query to show names from Table 1 that are not in table 2? So filtering out all the names in table 1 that are in table 2 gives the result query. Filtering is on ID not name.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这应该比
left join...is null
版本表现得更好。请参阅这里和此处进行比较。This should perform better than the
left join...is null
version. See here and here for comparisons.使用此查询
可以将 t1 中的所有内容连接到 t2 中存在的内容。 where 子句过滤掉 t2 中不存在的所有记录。
Use this query
this works by joining everything in t1 to whatever exists in t2. the where clause filters out all of the records that don't exist in t2.
我认为应该这样做。
I think that should do it.
尝试这样:
Try like this: