Answers for "how to delete all the data in the collection mongodb"

4

mongodb remove all from collection

db.collection.remove({})
Posted by: Guest on December-21-2020
2

delete an item from db collection mongodb

db.collection.remove(
   <query>,
   {
     justOne: <boolean>,
     writeConcern: <document>
   }
)
Posted by: Guest on December-07-2019

Code answers related to "how to delete all the data in the collection mongodb"

Browse Popular Code Answers by Language