当前位置:网站首页>嵌入式数据库开发编程(五)——DQL
嵌入式数据库开发编程(五)——DQL
2022-07-05 04:56:00 【光追雨】
一、数据集

二、查询记录
select field1,field2,…fieldn… from 表名 [where 条件]
select*from 表名 [where 条件]
三、查询不重复的记录
- select distinct 字段 from 表名
- select distinct name from students;//4查询名字不相同的学生;
- select distinct name,age from students;//查询名字和年龄同时不同的学生
- distinct必须放在最开头
- distinct只能使用需要去重的字段进行操作
- distinct去重多个字段时,含义是:几个字段同时重复时才会被过滤。

四、条件查询
select字段from表名where条件; select*from student where sex='男’and age>20; //查询性别是男,并且年龄大于20
where后面的条件可以用>、<、>=、<=、!=等多种比较运算符,多个条件之间可以用or、and等逻辑运算符




五、排序和限制
5.1 排序


5.2 限制

六、聚合

6.1 聚合函数



七、多表查询

八、表连接



边栏推荐
- Redis 排查大 key 的4种方法,优化必备
- AutoCAD - scaling
- Unity3d learning notes
- Lua GBK and UTF8 turn to each other
- China as resin Market Research and investment forecast report (2022 Edition)
- Cocos2dx Lua registers the touch event and detects whether the click coordinates are within the specified area
- Unity writes timetables (without UI)
- Unity enables mobile phone vibration
- China needle coke industry development research and investment value report (2022 Edition)
- xss注入
猜你喜欢
![[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)](/img/aa/3c8b7b27e322417777d1315b9a5a8f.jpg)
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)

3dsmax snaps to frozen objects

2021 huashubei mathematical modeling idea + reference + paper

2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem

2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
![Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]](/img/e7/f699ee982ea325b8d04f8bd467a559.jpg)
Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]

Emlog博客主题模板源码简约好看响应式

Emlog blog theme template source code simple good-looking responsive

Panel panel of UI

669. Prune binary search tree ●●
随机推荐
【Leetcode】1352. Product of the last K numbers
AutoCAD - continuous annotation
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
LeetCode之单词搜索(回溯法求解)
Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]
2020-10-27
Panel panel of UI
AutoCAD - graphic input and output
Emlog blog theme template source code simple good-looking responsive
Three dimensional dice realize 3D cool rotation effect (with complete source code) (with animation code)
中国聚氨酯硬泡市场调研与投资预测报告(2022版)
Introduction to JVM principle and process
cocos2dx_ Lua particle system
2020-10-27
Detailed explanation of the ranking of the best universities
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Basic knowledge points
3dsmax2018 common operations and some shortcut keys of editable polygons
Unity intelligent NPC production -- pre judgment walking (method 1)