Useuse newdb
Create a new database without inserting any datashow dbs
This database will not be displayed, so it should not be added to the memory. But deleting it shows{ "ok" : 1 }
That’s right, so I would like to ask if the new empty database is stored.
1. No storage
2. after passing db.dropDatabase (), execute this command test again and return {ok: 1}use memberSystem
switched to db memberSystem
db.dropDatabase()
{ "dropped" : "memberSystem", "ok" : 1 }
db.dropDatabase()
{ "dropped" : "memberSystem", "ok" : 1 }
db.dropDatabase()
3. mongodb will not judge whether the database exists when deleting, but directly deletes it. As long as no error is reported, it will return {ok:1}, even if there is no such database.