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



七、多表查询

八、表连接



边栏推荐
- Detailed introduction of OSPF header message
- Chinese notes of unit particle system particle effect
- Lua wechat avatar URL
- Séparation et combinaison de la construction du système qualité
- Panel panel of UI
- MD5绕过
- Unity enables mobile phone vibration
- Special information | finance, accounting, audit - 22.1.23
- Number theoretic function and its summation to be updated
- stm32Cubemx(8):RTC和RTC唤醒中断
猜你喜欢

【acwing】528. cheese

AutoCAD - window zoom

【Leetcode】1352. 最后 K 个数的乘积

Recherche de mots pour leetcode (solution rétrospective)

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

AutoCAD - Center zoom

Manually implement heap sorting -838 Heap sort

Detailed introduction of OSPF header message

UE4/UE5 虚幻引擎,材质篇,纹理,Compression and Memory压缩和内存

Is $20billion a little less? Cisco is interested in Splunk?
随机推荐
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
AutoCAD -- dimension break
China needle coke industry development research and investment value report (2022 Edition)
Manually implement heap sorting -838 Heap sort
Unity enables mobile phone vibration
Unity shot tracking object
Three dimensional dice realize 3D cool rotation effect (with complete source code) (with animation code)
Cocos progress bar progresstimer
Rip notes [rip message security authentication, increase of rip interface measurement]
MySQL audit log archiving
C4D simple cloth (version above R21)
Lua determines whether the current time is the time of the day
Personal required code
Redis 排查大 key 的4种方法,优化必备
C # perspective following
AutoCAD - Center zoom
Listview pull-down loading function
Difference between singleton and factory pattern
2021-10-29