Query other than current database
In mongoDB, can I query on DB other than the current DB? Example: If I have two different databases A and B, and my current database is A (in console), then, can I query on B database?
You can query another database on the same mongod / mongos instance with the .getSiblingDB() method, for example:
use A db.getSiblingDB('B').collection.find(...)