Loading, please wait...

MongoDB update operation

Update Operation

In MongoDB, update() method updates the values in the existing document..

Syntax-:  >db.COLLECTION_NAME.update(SELECTION_CRITERIA, UPDATED_DATA)

Example

>db.mycol.update({'title':'MongoDB Overview'},{$set:{'title':'NoSQL MongoDB Tutorial'}})