json 查找ORDER BY,LIMIT

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json 查找ORDER BY,LIMIT相关的知识,希望对你有一定的参考价值。


db.alura.find().sort({"nome":1}) //Order by ASC
db.alura.find().sort({"nome":-1}) //Order by DESC

db.alura.find().sort({"nome":1}).limit(3)//Order by ASC and LIMIT 

以上是关于json 查找ORDER BY,LIMIT的主要内容,如果未能解决你的问题,请参考以下文章