1.

Insert Multiple Row

Answer»

The MongoDB shell provides the following methods to insert multiple rows:

db.docx.insertMany([
{
title: 'Post six,
body: 'Body of post six,
category: 'Science',
date: Date()
},
{
title: 'Post seven',
body: 'Body of post seven',
category: 'Information',
date: Date()
},
{
title: 'Post eight',
body: 'Body of post eight',
category: 'Sports',
date: Date()
}
])


Discussion

No Comment Found