Get the App
SLTechnology News&Howtos  ›  Database  › 

MongoDB modifies data through Save

Shulou Source: shulou.com Published: 2022-06-01 22:39:41 11月07日 Update

1. View the collection

Show collections

two。 View data in the collection

Db.runoob.find () .pretty ()

3. Modify multiple pieces of data in the collection

Db.runoob.save ({

"_ id": ObjectId ("5bce9025cd35ce6f77bf0198")

"test": 4

})

4. View and format the data in the collection

Db.runoob.find () .pretty ()

Tags: Data multiple format Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MySQL OPPO Reno Huawei Docker