当前位置:网站首页>嵌入式数据库开发编程(五)——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 聚合函数



七、多表查询

八、表连接



边栏推荐
- Special information | finance, accounting, audit - 22.1.23
- Basic knowledge points
- Unity card flipping effect
- Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
- django连接数据库报错,这是什么原因
- Create a pyGame window with a blue background
- AutoCAD - full screen display
- AutoCAD - lengthening
- 54. Spiral matrix & 59 Spiral matrix II ●●
- Unity enables mobile phone vibration
猜你喜欢

Chinese notes of unit particle system particle effect

Recherche de mots pour leetcode (solution rétrospective)

Create a pyGame window with a blue background
![[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)](/img/90/0cf08ae6fea61891e3e1fdf29d310c.jpg)
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
![[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)

【acwing】836. Merge sets

AutoCAD - set layer

UE 虚幻引擎,项目结构

669. Prune binary search tree ●●

Leetcode word search (backtracking method)
随机推荐
Special information | finance, accounting, audit - 22.1.23
数论函数及其求和 待更新
This article is good
Lua wechat avatar URL
Introduce Hamming distance and calculation examples
China needle coke industry development research and investment value report (2022 Edition)
China polyurethane rigid foam Market Research and investment forecast report (2022 Edition)
LeetCode之單詞搜索(回溯法求解)
【acwing】240. food chain
Panel panel of UI
AutoCAD - Document Management
AutoCAD - Center zoom
Difference between singleton and factory pattern
Unity ugui source code graphic
PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
Basic knowledge points of dictionary
UE4/UE5 虚幻引擎,材质篇,纹理,Compression and Memory压缩和内存
AutoCAD -- dimension break
【acwing】836. Merge sets
An article takes you to thoroughly understand descriptors