Answers for "mongodb find all fields in all collection"

Go
4

get all data in collection mongodb

db.collection_name.find().pretty()
Posted by: Guest on November-04-2020
0

get only some fields of document in mongodb

db.student.find({}, {roll:1, _id:0})
 same as SELECT roll FROM student
Posted by: Guest on May-18-2021

Code answers related to "mongodb find all fields in all collection"

Browse Popular Code Answers by Language