Nearby lessons
4 of 22🧩 MongoDB: Insert Documents
MongoDB provides commands to insert single or multiple documents into a collection.
You can add records using insertOne() for one document or insertMany() for multiple documents.
Insert a single document using insertOne()
View inserted document
Insert multiple documents using insertMany()
View all documents in the collection
Keep Going!MongoDB - Datatypes