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