---
title: "Discussion on \"How do you Update a Document?\" | Hashnode"
description: "Discussion on \"How do you Update a Document?\". To update a single document, use db.collection.updateOne()\nTo update multiple documents, use db.collection.updateMany()"
url: "https://hashnode.com/posts/how-do-you-update-a-document/63427ad0ba6f2f01c75bbdb7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How do you Update a Document?](https://rajamuhammadasher.com/how-do-you-update-a-document?utm_source=hashnode&utm_medium=feed)

To update a single document, use db.collection.updateOne() To update multiple documents, use db.collection.updateMany()

Jun 11, 2022 · 1 min read · rajamuhammadasher.com  
Read the article

-   [#mongodb](https://hashnode.com/tag/mongodb)

## Written by

[Raja Muhammad Asher](https://hashnode.com/@rajamuhammadasher)

@rajamuhammadasher · USA

  
[View profile](https://hashnode.com/@rajamuhammadasher)

Full Stack Developer

Full Stack Developer with a passion for building web applications. PHP, Node.js, Laravel, MySQL, MongoDB. Love collaborating &amp; making a difference

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
