Skip to content

SQL Reference

UPDATEMANY

db.collection.updateMany(filter, update, options)

Section titled “db.collection.updateMany(filter, update, options)”
  • filter: The selection filter for the documents to update.
  • update: Update operators, or an aggregation pipeline, describing the changes.
  • options: Optional settings such as upsert.
db.users.updateMany({ active: false }, { $set: { archived: true } })