类似 sql 的 Select * from TableName where a not in (select a from TableName2) as abc
请问这样的功能如何用MongoDB实现,谢谢!
...全文
5951打赏收藏
Mongodb 如何进行查询 $nin 不在另一个结果集内 的文档
类似于 mysql 的子查询 例如: 我现在要查询文章列表, 我之前看过的文章就不再显示了。 db.wenzhang.find({"red":{"$nin":[ 另一个表中得数据 另一个 find ]}}) 类似 sql 的 Select * from TableName where a not in (select a from TableName2) as abc 请问这样的功能如何用MongoDB实现,谢谢!