排序 方法sort(),用于对结果集进行排序语法 db.集合名称.find().sort({字段:1,...}) 参数1为升序排列参数-1为降序排列例1:根据性别降序,再根据年龄升序 db.stu.find().sort({gender:-1,age:1})