Limit Update Documents

[Solved] Limit Update Documents | Php - Code Explorer | yomemimo.com
Question : limit update documents

Answered by : crowded-cockroach-9za23wg9tvju

db.collection.find(<condition>).limit(<limit>).forEach(function(doc){db.collection.update({_id:doc._id},{<your update>})})

Source : https://stackoverflow.com/questions/6590890/how-to-limit-number-of-updating-documents-in-mongodb/6591203#6591203 | Last Update : Tue, 04 Jan 22

Answers related to limit update documents

Code Explorer Popular Question For Php