Docs Menu
Docs Home
/
MongoDB Manual
/ /

Insert Methods

MongoDB provides the following methods for inserting documents into a collection:

Method
Description
Inserts a single document into a collection.
db.collection.insertMany() inserts multiple documents into a collection.
db.collection.insert() inserts a single document or multiple documents into a collection.

If you use MongoDB Atlas, the fully managed service for MongoDB deployments in the cloud, you can use these methods to insert documents after you connect to your cluster. To learn more, see the following resources in the MongoDB Atlas documentation:

The following methods can also add new documents to a collection, including collections hosted in MongoDB Atlas:

See the individual reference pages for the methods for more information and examples.

Back

Insert Documents