简体   繁体   中英

Subtract result set of 2 queries of different collections in mongodb

减去2个查询的结果集,每个查询位于不同的集合上,但给出相同的结果集。如何从mongod控制台执行此操作。

You can't do that from console. If you need something like that, you shoud ask yourself is your data model ok. Maybe you shoud combine those two collections into one (a mongodb collection can containt different documents, no matter their structure). Then one query would be enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM