Answers for "delete everything mongodb"

2

delete collection mongodb

db.collection.drop()
Posted by: Guest on July-26-2020
0

delete everything mongodb

use [database];
db.dropDatabase();
Posted by: Guest on September-13-2021
0

mongo remove all tables

mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})'
Posted by: Guest on November-29-2020

Code answers related to "delete everything mongodb"

Browse Popular Code Answers by Language