In this post, We will learn How to create a collection in MongoDB. MongoDB is stored in the format of documents and Documents are stored in the collection. Collections are stored in the database. Collections is a group of MongoDB documents like a table. MONGO DATABASE > COLLECTIONS > DOCUMENTS We can create collections in […]
Tag Archives: Mongo Collections
In this post, We will learn How to delete a collection from MongoDB. MongoDB shell command `db.collection.drop()` is used to drop the specified collection from the selected DB. Also, It will remove all the documents and indexes associated with the dropped collection. Syntax: db.collection_name.drop() Drop Query Response: It will return `true` when successfully drops a […]