例如: 我现在要查询文章列表, 我之前看过的文章就不再显示了。
db.wenzhang.find({"red":{"$nin":[ 另一个表中得数据 另一个 find ]}})
类似 sql 的 Select * from TableName where a not in (select a from TableName2) as abc
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
mongo不支持此类联合查找
建议改进自己的设计