当前位置:网站首页>sql 左连接,内连接 的写法「建议收藏」
sql 左连接,内连接 的写法「建议收藏」
2022-07-28 21:58:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
左连接的含义: 使用 LEFT JOIN 关键字,会从 左表 那里返回所有的行,即使在 右表 中没有匹配的行。
1)左连接
select a.*, b.*
from table1 a
left join table2 b
on a.id = b.parent_id
2) 内连接
select a.*, b.*
from table1 a
inner join table2 b
on a.id = b.parent_id
或
select a.*, b.*
from table1 a
join table2 b
on a.id = b.parent_id
内连接写成 inner join 或 join,没区别发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/128979.html原文链接:https://javaforall.cn
边栏推荐
- PHP 海报二维码合成
- 金仓数据库 KingbaseES V8.3至V8.6迁移最佳实践(2. KingbaseES V8.3和 V8.6 兼容性)
- 2022g3 boiler water treatment test simulation 100 questions simulation test platform operation
- AUTOCAD——Excel表格导入CAD、CAD合并两兄弟
- 金仓数据库 KingbaseES 与 Oracle 的兼容性说明(3. 常用函数)
- Rhce第一天
- Rhce第二天
- MySQL log management, backup and recovery
- Learn browser decoding from XSS payload
- 【数据挖掘工程师-笔试】2022年大华股份
猜你喜欢

浪潮ClusterEngineV4.0 远程命令执行漏洞 CVE-2020-21224

【自】-刷题-数组
![[self] - question brushing - peak value](/img/cf/9c47da9c574b61415578e7fde8b126.png)
[self] - question brushing - peak value

互动滑轨屏在展厅中应用的制作步骤

Achieve high throughput through Wi Fi 7 - insight into the next generation of Wi Fi physical layer

Xss.haozi.me range details

事件抽取文献整理(2018)

刨根问底学 二叉树

KingbaseES客户端编程接口指南-ODBC(4. 创建数据源)

宝塔 phpmyadmin未授权访问漏洞
随机推荐
金仓数据库 KingbaseES 与 Oracle 的兼容性说明(3. 常用函数)
2022T电梯修理考试试题及模拟考试
Few people can really play in the "aftermarket" of the whole house intelligent fire collection
深度剖析集成学习Xgboost(续)
网络流量监控工具iftop
Wechat applet development ④
Zabbix 5.0 使用自带Redis模版监控
宝塔 phpmyadmin未授权访问漏洞
商家对积分体系运营的两个误解
Achieve high throughput through Wi Fi 7 - insight into the next generation of Wi Fi physical layer
xss.haozi.me靶场详解
金仓数据库 KingbaseES 与 Oracle 的兼容性说明(4. SQL)
How to open a profitable gym? I tell you from one year's experience that don't fall in love
Pin mapping relationship of stm32f103c series single chip microcomputer under Arduino framework
新一代超安全蜂窝电池 思皓爱跑上市13.99万元起售
Neglected smart TV applet field
阻塞式队列
wget什么意思
金仓数据库 KingbaseES 与 Oracle 的兼容性说明(5. PL/SQL)
2022焊工(初级)上岗证题目及答案