当前位置:网站首页>嵌入式数据库开发编程(五)——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 聚合函数
七、多表查询
八、表连接
边栏推荐
- 2021 huashubei mathematical modeling idea + reference + paper
- 2020-10-27
- AutoCAD - stretching
- Unity ugui source code graphic
- MD5 bypass
- Basic knowledge points
- [groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
- [groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
- cocos_ Lua loads the file generated by bmfont fnt
- Emlog博客主题模板源码简约好看响应式
猜你喜欢
LeetCode之單詞搜索(回溯法求解)
Redis 排查大 key 的4种方法,优化必备
Autocad-- dynamic zoom
An article takes you to thoroughly understand descriptors
AutoCAD - scaling
UE 虚幻引擎,项目结构
Special information | finance, accounting, audit - 22.1.23
2021 Higher Education Club Cup mathematical modeling national tournament ABCD problem - problem solving ideas
【Leetcode】1352. Product of the last K numbers
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
随机推荐
Pdf to DWG in CAD
2022/7/1学习总结
Unity sends messages and blocks indecent words
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
Unity parallax infinite scrolling background
Emlog blog theme template source code simple good-looking responsive
UE 虚幻引擎,项目结构
Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
Detailed introduction of OSPF header message
AutoCAD - Center zoom
3dsmax scanning function point connection drawing connection line
cocos_ Lua listview loads too much data
UE4/UE5 虚幻引擎,材质篇(三),不同距离的材质优化
2020-10-27
MD5 bypass
JMeter -- distributed pressure measurement
The difference between heap and stack
On-off and on-off of quality system construction
How to choose a panoramic camera that suits you?
Common technologies of unity