You are viewing an offline version of MongoDB documentation. Some page features might be unavailable. To view the latest version of the page or use interactive features, visit the live page.
Update Methods
MongoDB provides the following methods for updating documents in a collection:
Updates at most a single document that match a specified filter even though multiple documents may match the specified filter. | |
Update all documents that match a specified filter. | |
Replaces at most a single document that match a specified filter even though multiple documents may match the specified filter. |
Additional Methods
The following methods can also update documents from a collection:
See the individual reference pages for the methods for more information and examples.