MongoDB modifies multiple pieces of data information in the collection
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.update (
{'title':'demo'}
{$set: {'title':'demo multi'}}
{multi:true}
)
4. View and format the data in the collection
Db.runoob.find () .pretty ()