MongoShell
Manipulate Database/Collection via mongo shell
show dbsuse test_databaseshow collections# Just insert a document
db.test_collection.insert({})
# OR create a collection explicitly
db.createCollection("test_collection")db.test_collection.drop()db.dropDatabase()db.cloneDatabase()
db.cloneCollection()
db.createView()
db.getCollectionsInfos()
db.status()Last updated
Was this helpful?