update data in mongo db

technical talkiess
0

 db.anotherCollection.insertOne({a:90})


// ye wali updat query hai .... $set bole to uski value kya set karni hai wo hai 

db.items.updateOne({name:"vishal phone"},{$set:{price:1200}})

// many data aur multiple row ko update karne ke liy 

db.items.updateMany({name:"vishal phone"},{$set:{price:1200,rating:1}})

Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)