#06 Insert Documents in Collection | Fundamentals of MongoDB | Complete MongoDB Course 2022

Опубликовано: 09 Август 2022
на канале: procademy
6,143
110

In this lecture, you are going to learn about different methods which MongoDB provides to insert a document into a collection. Basically, there are two methods:

* insertOne(): inserts a single document at a time.
* insertMany(): insert multiple documents at a time

We also have another method for inserting single or multiple document called insert(), but this method is deprecated in most of the mongoDB drivers. So, we should avoid using that.