mongodb排序

使用sort即可,如下:

db.adu.find().sort({"Age":-1})

其中,Age为排序字段,-1表示降序,1表示升序

记录编程的点滴,体会学习的乐趣
原文地址:https://www.cnblogs.com/AduBlog/p/15008951.html