当前位置:网站首页>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 .
边栏推荐
- Oracle tablespace management
- 全国爱眼教育大会,2022第四届北京国际青少年眼健康产业展会
- 1: Citation;
- Leetcode brush question: binary tree 14 (sum of left leaves)
- 《乔布斯传》英文原著重点词汇笔记(十二)【 chapter ten & eleven】
- .Net分布式事务及落地解决方案
- 【c语言】归并排序
- sun.misc.BASE64Encoder报错解决方法[通俗易懂]
- SecureRandom那些事|真伪随机数
- [quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design
猜你喜欢

js实现禁止网页缩放(Ctrl+鼠标、+、-缩放有效亲测)

CTF逆向基础

【数字IC验证快速入门】2、通过一个SoC项目实例,了解SoC的架构,初探数字系统设计流程
![Scala basics [HelloWorld code parsing, variables and identifiers]](/img/75/1d89581b9b8299ffb55d95514e6df4.png)
Scala basics [HelloWorld code parsing, variables and identifiers]

Practical demonstration: how can the production research team efficiently build the requirements workflow?

JVMRandom不可设置种子|问题追溯|源码追溯

Scala基础【HelloWorld代码解析,变量和标识符】

2023年深圳市绿色低碳产业扶持计划申报指南

解决php无法将string转换为json的办法

秋招字节面试官问你还有什么问题?其实你已经踩雷了
随机推荐
C language OJ gets PE, OJ of ACM introduction~
股票开户哪里好?网上客户经理开户安全吗
全国爱眼教育大会,2022第四届北京国际青少年眼健康产业展会
E. Singhal and Numbers(质因数分解)
Notes on key vocabulary in the English original of the biography of jobs (12) [chapter ten & eleven]
Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?
实操演示:产研团队如何高效构建需求工作流?
How to choose a good external disk platform, safe and formal?
Oracle tablespace management
sun. misc. Base64encoder error reporting solution [easy to understand]
PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
[quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
CADD课程学习(7)-- 模拟靶点和小分子相互作用 (半柔性对接 AutoDock)
Is it safe for Guosen Securities to open an account online?
sort和投影
leetcode刷题:二叉树17(从中序与后序遍历序列构造二叉树)
Wechat applet regular expression extraction link
DP: tree DP