Login
Remember
Register
Ask a Question
What is the syntax of the limit() and sort() method?
0
votes
asked
Jan 7, 2023
in
MongoDB
by
sharadyadav1986
What is the syntax of the limit() and sort() method?
limit-method
sort-method
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 7, 2023
by
sharadyadav1986
Syntax of the limit() method is:
>db.COLLECTION_NAME.find().limit(NUMBER)
Syntax of the sort() method is:
>db.COLLECTION_NAME.find().sort({KEY:1})
...