In my MongoDB, I have a student collection with 10 records having fields name and roll. One record of this collection is:
name
roll
{ \"
db.student.find({}, {"roll":1, "_id":0})
This is equivalent to -
Select roll from student
db.student.find({}, {"roll":1, "name":1, "_id":0})
Select roll, name from student