Skip to content
sneppets

sneppets

  • Privacy

How to drop a mongodb database from mongo shell and command line?

March 16, 2020 Editorial StaffLeave a Comment on How to drop a mongodb database from mongo shell and command line?

This tutorial guides you how to drop a mongodb database from both mongo shell and command line.

MongoDB command line, mongodb

How to fetch last n records from a collection in mongodb

March 13, 2020March 16, 2020 Editorial StaffLeave a Comment on How to fetch last n records from a collection in mongodb

This tutorial guides you how to fetch last n records from a collection in MongoDB.

MongoDB mongodb, records
add new field in mongo collection documents

How to add new field in an existing Mongo DB collection document

May 19, 2019 Editorial Staff1 Comment on How to add new field in an existing Mongo DB collection document

This sneppet teaches you how to add new field to every existing document in the mongo db collection. You have to use db.collection.update() with $set operator to perform this operation in the same way you used to update existing field… Read More!

MongoDB mongodb
import csv using mongoimport

How to import CSV using mongoimport command in MongoDB

April 7, 2019 Editorial StaffLeave a Comment on How to import CSV using mongoimport command in MongoDB

Are you struggling to import CSV file data using mongoimport command in MongoDB ? Then this tutorial will teach you how to do that. The prerequisites to try out this example is, please ensure you had installed MongoDB server and… Read More!

MongoDB mongodb, mongodb compass
mongodb like query

MongoDB query to perform a LIKE match – Example

March 8, 2019 Editorial StaffLeave a Comment on MongoDB query to perform a LIKE match – Example

This article explains you how to write a mongo query to perform a LIKE match in MongoDB. Note, MongoDB does not have “LIKE” operator like you have in SQL which can be used in a WHERE clause to search for… Read More!

MongoDB mongodb

Posts navigation

Older posts
Newer posts
Copyright © 2018 Sneppets. All Rights Reserved