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



七、多表查询

八、表连接



边栏推荐
- Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?
- Listview is added and deleted at the index
- This article is good
- Unity parallax infinite scrolling background
- Unity connects to the database
- JMeter -- distributed pressure measurement
- Forecast report on research and investment prospects of Chinese wormwood industry (2022 Edition)
- 中国艾草行业研究与投资前景预测报告(2022版)
- Cocos2dx Lua registers the touch event and detects whether the click coordinates are within the specified area
- Special information | finance, accounting, audit - 22.1.23
猜你喜欢

2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling

AutoCAD - full screen display

Autocad-- dynamic zoom

2022/7/2做题总结

stm32Cubemx(8):RTC和RTC唤醒中断

JVM 原理和流程简介

54. Spiral matrix & 59 Spiral matrix II ●●

Chinese notes of unit particle system particle effect

【acwing】240. food chain

Solutions and answers for the 2021 Shenzhen cup
随机推荐
Sqlserver stored procedures pass array parameters
Listview pull-down loading function
Unity enables mobile phone vibration
[groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
2022 American College Students' mathematical modeling ABCDEF problem thinking /2022 American match ABCDEF problem analysis
Autocad-- Real Time zoom
Listview is added and deleted at the index
xss注入
How much do you know about 3DMAX rendering skills and HDRI light sources? Dry goods sharing
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
Lua GBK and UTF8 turn to each other
Unity intelligent NPC production -- pre judgment walking (method 1)
AutoCAD - isometric annotation
Forecast report on research and investment prospects of Chinese wormwood industry (2022 Edition)
Animation
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)
mysql審計日志歸檔
用 Jmeter 工具做个小型压力测试
Redis has four methods for checking big keys, which are necessary for optimization
Séparation et combinaison de la construction du système qualité