mongo mongoshell query examples

mongo mongoshell query examples

db.MYTABLE.find()
db.MYTABLE.find({}).count
db.MYTABLE.find({}).limit(10)
db.MYTABLE.find({"name":"a"})
db.MYTABLE.find({"name":"a"},{name:1})
db.MYTABLE.find({"name":"a"}).sort({name:1})
db.MYTABLE.remove({"name":"a"})