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



七、多表查询

八、表连接



边栏推荐
- mysql审计日志归档
- Sixth note
- cocos2dx_ Lua particle system
- #775 Div.1 B. Integral Array 数学
- AutoCAD - full screen display
- Redis has four methods for checking big keys, which are necessary for optimization
- 2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem
- 2021 electrician cup idea + code - photovoltaic building integration plate index development trend analysis and prediction: prediction planning issues
- MD5 bypass
- Forecast report on research and investment prospects of Chinese wormwood industry (2022 Edition)
猜你喜欢

2022 thinking of Mathematical Modeling B problem of American college students / analysis of 2022 American competition B problem

Panel panel of UI

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

Unity find the coordinates of a point on the circle

AutoCAD - continuous annotation

Unity ugui source code graphic
![[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)](/img/1b/1fa2ebc9a6c5d271c9b39f5e508fb0.jpg)
[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)

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

Emlog blog theme template source code simple good-looking responsive

AutoCAD - stretching
随机推荐
Detailed explanation of the ranking of the best universities
China as resin Market Research and investment forecast report (2022 Edition)
Unity writes timetables (without UI)
How much do you know about 3DMAX rendering skills and HDRI light sources? Dry goods sharing
中国AS树脂市场调研与投资预测报告(2022版)
Sixth note
【acwing】240. food chain
Fluent objects and lists
【acwing】837. Number of connected block points
AutoCAD - Zoom previous
[groovy] closure (closure call is associated with call method | call () method is defined in interface | call () method is defined in class | code example)
Unity sends messages and blocks indecent words
[groovy] closure (Introduction to closure class closure | closure parametertypes and maximumnumberofparameters member usage)
Lua GBK and UTF8 turn to each other
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
Redis has four methods for checking big keys, which are necessary for optimization
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
Common technologies of unity
Judge the position of the monster in the role under unity3d
AutoCAD - workspace settings