当前位置:网站首页>linux系统笑着玩Oracle数据库多表查询-连接查询
linux系统笑着玩Oracle数据库多表查询-连接查询
2022-06-27 18:06:00 【Friends of the wind】
学完本节有哪些收获:
- 熟练使用连接查询获取记录
- 举一反三,学会使用最简单方法来满足复杂查询
定义
内连接查询:返回满足条件的记录
外连接查询:不仅返回满足条件的记录,而且返回不满足条件的记录;根据以那张表不满足条件的记录为准,分为
左外连接:也要返回连接操作符左边有记录,右边无记录行
右外连接:也要返回连接操作符右边有记录,左边无记录行完全外连接:Oracle独有,通过full [outer] join选项来实现的,不仅返回满足条件的记录,也返回操作符左右两边都无记录的行
自连接:在同一张表之间的连接查询,主要用于自参照表上显示下级关系或者层次关系。自参照表是指在不同列之间具有参照关系或主从关系的表。
示例
提示:生产环境表是很复杂的结构,方便您容易看懂,做了简化
创建三张表:
--创建表结构
create table a
(
id number primary 边栏推荐
猜你喜欢

Redis持久化

Summary of submarine cable detection technology

Crontab's learning essays

【登录界面】

什么是SSR/SSG/ISR?如何在AWS上托管它们?

数智化进入“深水区”,数据治理是关键

连接集成开发专题月 | 企业主数据治理的驱动因素

Redis集群

429- binary tree (108. convert the ordered array into a binary search tree, 538. convert the binary search tree into an accumulation tree, 106. construct a binary tree from the middle order and post o

数智化进入“深水区”,数据治理是关键
随机推荐
Data intelligence enters the "deep water area", and data governance is the key
Common shell script commands (4)
GIS remote sensing R language learning see here
Error reported by Huada MCU Keil_ Weak's solution
1024 Palindromic Number
UE4:Build Configuration和Config的解释
Hanoi Tower problem
数据库优化
Is the account opening QR code given by CICC securities manager safe? Who can I open an account with?
Mobile low code development theme month | visual development one click generation of professional source code
Oracle 获取月初、月末时间,获取上一月月初、月末时间
Observable, reliable: the first shot of cloudops series Salon of cloud automation operation and maintenance
MySQL表的增删改查(基础)
Web APls 阶段——第十四节——本地存储
ABAP-SM30删除前检查
实战回忆录:从Webshell开始突破边界
Seven phases of CMS implementation
Manage rust project through cargo
DCC888 :Register Allocation
shell脚本常用命令(三)