WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

MongoDB - Update Document


MongoDB's update() and shop() techniques are used to replace report into a group.

MongoDB Update() Method

The replace() method updates the values inside the existing document.

Syntax

There are following fundamental syntax of update() technique

Syntax

The basic syntax of update() method is as follows −

>db.COLLECTION_NAME.Replace(SELECTION_CRITERIA, UPDATED_DATA)

MongoDB Save() Method

The store() technique replaces the present report with the brand new record handed inside the store() technique.

Syntax

The fundamental syntax of MongoDB save() method is proven underneath −

>db.COLLECTION_NAME.Save(_id:ObjectId(),NEW_DATA)









Welookups is optimized for learning.Copy right 2018 - 2019 kumar aditya singh .
All Right Reserved and you agree to have read and accepted our term and condition.
All Rights Reserved.