Select… Insert.. in MongoDB
As we all Know, we can create table in MySQL by selecting records from another, or insert records in some table by selecting rows, based upon some criteria or condition,
which is very useful and efficient way if you want to further process the retrieved data. Similarly, in MongoDB we can achieve this task by following way:
MongoDB Command to select records from one table and Insert result in another table:
So the query in above example will fetch all records from collectionA, matching with the condition that is where country is USA and dump the query result in collection_dump.
… mongodb select insert …