📜  MongoDb更新——C编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:33.685000             🧑  作者: Mango

代码示例3
db.collectionName.update({"aField":"vale1"},{$set:{"anotherField":"value2"}})

-search for documentations for more examples than search
-aField is used to find the documents
-anotherField is the field that will be updated
-You can also use the below:
-- updateOne
-- findOneAndUpdate