MongoDB -Sortierfrage
db.Employee.find().sort({Employeeid:-1}).forEach(printjson)
Helpless Hoopoe
db.Employee.find().sort({Employeeid:-1}).forEach(printjson)
db.people.find( { status: "A" } ).sort( { user_id: 1 } )
db.people.find( { status: "A" } ).sort( { user_id: -1 } )
-- sql
SELECT *
FROM people
WHERE status = "A"
ORDER BY user_id ASC
SELECT *
FROM people
WHERE status = "A"
ORDER BY user_id DESC
result.reverse();