当前位置:网站首页>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 .
边栏推荐
- sort和投影
- [quick start to digital IC Verification] 8. Typical circuits in digital ICs and their corresponding Verilog description methods
- ROS2专题【01】:win10上安装ROS2
- When JS method passes long type ID value, precision loss will occur
- Scala basics [HelloWorld code parsing, variables and identifiers]
- Leetcode brush question: binary tree 14 (sum of left leaves)
- 【数字IC验证快速入门】9、Verilog RTL设计必会的有限状态机(FSM)
- Securerandom things | true and false random numbers
- 图嵌入Graph embedding学习笔记
- Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
猜你喜欢
Leetcode: binary tree 15 (find the value in the lower left corner of the tree)
[quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)
leetcode刷题:二叉树18(最大二叉树)
计算lnx的一种方式
leetcode刷题:二叉树14(左叶子之和)
【数字IC验证快速入门】7、验证岗位中必备的数字电路基础知识(含常见面试题)
kubernetes资源对象介绍及常用命令(五)-(ConfigMap&Secret)
Database logic processing function
[quick start of Digital IC Verification] 3. Introduction to the whole process of Digital IC Design
随机推荐
When JS method passes long type ID value, precision loss will occur
Go language learning tutorial (16)
炒股开户最低佣金,低佣金开户去哪里手机上开户安全吗
CCPC 2021威海 - G. Shinyruo and KFC(组合数,小技巧)
CADD课程学习(7)-- 模拟靶点和小分子相互作用 (半柔性对接 AutoDock)
处理文件和目录名
Practical demonstration: how can the production research team efficiently build the requirements workflow?
mongodb/文档操作
中金财富在网上开户安全吗?
Leetcode(347)——前 K 个高频元素
信息学奥赛一本通 1338:【例3-3】医院设置 | 洛谷 P1364 医院设置
Debezium series: PostgreSQL loads the correct last submission LSN from the offset
1: Citation;
leetcode刷题:二叉树15(找树左下角的值)
【数字IC验证快速入门】3、数字IC设计全流程介绍
Summer Challenge harmonyos - realize message notification function
信息学奥赛一本通 1339:【例3-4】求后序遍历 | 洛谷 P1827 [USACO3.4] 美国血统 American Heritage
解决php无法将string转换为json的办法
.Net分布式事务及落地解决方案
14. Users, groups, and permissions (14)