当前位置:网站首页>Sort and projection
Sort and projection
2022-07-05 20:17:00 【Why not sell egg cakes well】
14 sort And projection
// When querying documents , The default in accordance with the id Values
db.emp.find({});
//sort Used to specify the collation of documents
db.emp.find({}).sort({sal:1});
// Descending
db.emp.find({}).sort({sal:-1});
db.emp.find({}).sort({sal:1,empno:-1});
// When inquiring , You can set the query result at the second parameter , Projection
db.emp.find({},{ename:1,_id=0,sal=1});
limit/skip/sort The calling order is independent of the writing order .
边栏推荐
- mongodb基操的练习
- Let's talk about threadlocalinsecurerandom
- leetcode刷题:二叉树10(完全二叉树的节点个数)
- Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
- Convolution free backbone network: Pyramid transformer to improve the accuracy of target detection / segmentation and other tasks (with source code)
- selenium 元素信息
- A way to calculate LNX
- 怎么挑选好的外盘平台,安全正规的?
- Summer Challenge harmonyos - realize message notification function
- Leetcode skimming: binary tree 12 (all paths of binary tree)
猜你喜欢

走入并行的世界

Unity editor extended UI control

A way to calculate LNX

Guidelines for application of Shenzhen green and low carbon industry support plan in 2023

零道云新UI设计中

Enter the parallel world

Convolution free backbone network: Pyramid transformer to improve the accuracy of target detection / segmentation and other tasks (with source code)
![[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design](/img/92/7af0db21b3d7892bdc5dce50ca332e.png)
[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design

leetcode刷题:二叉树14(左叶子之和)

leetcode刷题:二叉树18(最大二叉树)
随机推荐
Codeforces Round #804 (Div. 2) - A, B, C
DP: tree DP
Schema和Model
Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)
[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design
Flume series: interceptor filtering data
Parler de threadlocal insecurerandom
618 "low key" curtain call, how can baiqiushangmei join hands with the brand to cross the "uncertain era"?
关于BRAM IP复位的优先级
字节跳动Dev Better技术沙龙成功举办,携手华泰分享Web研发效能提升经验
Four methods of random number generation | random | math | threadlocalrandom | securityrandom
Let's talk about threadlocalinsecurerandom
When JS method passes long type ID value, precision loss will occur
Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
处理文件和目录名
炒股开户最低佣金,低佣金开户去哪里手机上开户安全吗
[C language] three implementations of quick sorting and optimization details
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
leetcode刷题:二叉树15(找树左下角的值)
ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development