Tutorial by Examples

First Select Or Create a database. > use mydb switched to db mydb Using db.createCollection("yourCollectionName") method you can explicitly create Collection. > db.createCollection("newCollection1") { "ok" : 1 } Using show collections command see all col...
MongoDB's db.collection.drop() is used to drop a collection from the database. First, check the available collections into your database mydb. > use mydb switched to db mydb > show collections newCollection1 newCollection2 newCollection3 system.indexes Now drop the collection with...

Page 1 of 1