mongodb查询最大值

客户端(Robomongo)查询方式:

db.getCollection('test').find({}).sort({"id":1}).limit(1)

sort("id":1): 正序

sort("id":-1): 倒序

推荐一个防诈骗的公众账号

发布了8 篇原创文章 · 获赞 1 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/Doc_xu/article/details/78350995
今日推荐