# Update Operators

*noun*

say it: **“UP-dayt AH-puh-ray-terz”** **/ˈʌpˌdeɪt ˈɑpəˌreɪtərz/**

Special MongoDB instructions, such as $set and $inc, that change certain fields of a document without replacing the rest.

## What are **update operators** in MongoDB?

**Update operators** are `$`-prefixed instructions that change parts of a document in place: `$set` sets fields, `$inc` adds to a number, `$push` adds to an array and `$pull` removes from one. Without them, an update would replace the whole document.

```javascript
await vendors.updateOne(
  { name: "Bee Happy Honey" },
  { $set: { stall: 12 }, $inc: { rating: 0.1 }, $push: { products: "beeswax" } },
);
```

## In a sentence

- “With **update operators**, one updateOne call moved the vendor to stall 12 and added beeswax to its products.”
- “**Update operators** such as $inc change a number in the database itself, so two updates at once don't lose a count.”

Level: Apprentice · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/update-operators
