当前位置:网站首页>SQL子查询
SQL子查询
2022-07-21 17:39:00 【MarconiYe】
MySQL查询语句中可以在SQL语句中实现嵌套结构,这样的结构称为子查询
- 在
from
后面的子查询,即将查询之后的新表当成一个实际存在的表,对其进行二次查询 - 在
where
后的子查询,对于SQL查询语句的执行顺序来说,group by
在where
语句前执行,因此不能在where
语句中直接使用分组函数,但是可以在where中先用分组函数计算出一个值,再利用到条件中:
select name from student where (select avg(score) from student) > 90;
边栏推荐
- 鼠标移入select options会触发mouseleave 事件处理方案
- Let me understand your MySQL storage engine
- Ffmpeg audio decoding (seconds understand)
- js bind
- sed,流编辑器以及vim编辑器。
- OpenGL贴图保持原比例的一种方法
- 文件操作以及相关函数
- Is it safe for Galaxy Securities VIP to open an account with low commission? Is it a hoax?
- Conversion of JS time and timestamp
- Document operation II (5000 word summary)
猜你喜欢
文件操作以及相关函数
Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions.
【Oauth2】四、OAuth2AuthorizationRequestRedirectFilter
Token
给OES纹理添加雪花特效
QML drag pictures and objects across windows
Solve the problem that the plug-in center of idea is not connected to the network
三星6818基于uboot的流水灯程序
Openlayers uses canvas to draw round avatar icons
Pointer summary
随机推荐
【OAuth2】二、OAuth2.1的已知变动
scrollIntoView
js 判断数据是否为空
5G和移动边缘计算服务器如何打造智慧园区
基于[三星6818]芯片超声波测距驱动编写
Postman configures the global variable postman sets the global token
Let me understand your MySQL storage engine
使用style解决异形屏横屏时的白色边框
文件操作以及相关函数
中信建投开户是安全吗?可以直接进行开户办理吗??
My ideal "meta universe"
Experimental support for decorators is a feature that is subject to change in a future release. Set
leetcode_ Add two numbers_ Personal solution
Is it safe for Galaxy Securities VIP to open an account with low commission? Is it a hoax?
新手股票开户安全吗?网上可以办理吗?
Openlayers uses canvas to draw round avatar icons
一篇让理解你Mysql存储引擎
力扣之滑动窗口《循序渐进》(209.长度最小的子数组、904. 水果成篮)
OSPF 重发布
File operation and related functions