What is the syntax to create a collection and to drop a collection in mongodb?
Answer Posted / Parul Sonker
To create a collection, use the following command: `db.createCollection(collectionName)`. To drop a collection, use the following command: `db.collectionName.drop()`.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers