Loading…

How do I create a collection in MongoDB? Write it's syntax

In MongoDB, developers do not need to create a collection. It will get created automatically when a document will be inserted.

The syntax for creating a collection in MongoDB is: db.createCollection(name,options)

Suggest An Answer

No suggestions avaliable!

Latest post from MongoDB Interview Questions

Ask Question