当前位置:网站首页>Oracle multi table query
Oracle multi table query
2022-06-27 10:55:00 【Mr. Li, a prodigy】
If a worker wants to do a good job, he must sharpen his tools first
Articles are constantly updated , You can search by wechat 【 Xiaoqi JAVA interview 】 First time reading , reply 【 Information 】 Access to benefits , reply 【 project 】 Get the source code of the project , reply 【 The resume template 】 Get resume template , reply 【 Learning Roadmap 】 Get a learning roadmap .

List of articles
- One 、 Link query
- 1、 Query student information and teacher information , And among the students id, And teachers sid equal .
- 2、 Check student name and teacher name , And among the students id, And teachers sid equal .
- 3、 Check student name and teacher name , And among the students id, And teachers sid Use left join query .
- 4、 Check student name and teacher name , And among the students id, And teachers sid Use right join query .
- 5、 Check student name and teacher name , And among the students id, And teachers sid Use inner link query .
- Two 、 Data collection operations
- 1、 Query all student information and student name as “ Zhang San ” Student information , If repeated, remove the repeated .
- 2、 Query all student information and student name as “ Zhang San ” Student information , If the repetition is also displayed .
- 3、 Query all student information and student name as “ Zhang San ” The intersection of student information , If there is intersecting information, you can find it .
- 4、 Query all student information and student name as “ Zhang San ” Difference set of student information based on ( The difference set is the information one party has and the other party does not have ).
- 3、 ... and 、 summary
One 、 Link query
1、 Query student information and teacher information , And among the students id, And teachers sid equal .
select * from student,teacher where student.id = teacher.sid;
2、 Check student name and teacher name , And among the students id, And teachers sid equal .
select s.name,t.name from student s,teacher.t where s.id = t.sid;
3、 Check student name and teacher name , And among the students id, And teachers sid Use left join query .
select s.name,t.name from student s left join teacher t on s.id = t.sid;
4、 Check student name and teacher name , And among the students id, And teachers sid Use right join query .
select s.name,t.name from student s right join teacher t on s.id = t.sid;
5、 Check student name and teacher name , And among the students id, And teachers sid Use inner link query .
select s.name,t.name from student s inner join teacher t on s.id = t.sid;
Two 、 Data collection operations
intersection 、 Combine 、 Difference set 、 Complement set
1、 Query all student information and student name as “ Zhang San ” Student information , If repeated, remove the repeated .
select * from student
union
select * from student where name = ' Zhang San ';
2、 Query all student information and student name as “ Zhang San ” Student information , If the repetition is also displayed .
select * from student
union all
select * from student where name = ' Zhang San ';
3、 Query all student information and student name as “ Zhang San ” The intersection of student information , If there is intersecting information, you can find it .
select * from student
intersect
select * from student where name = ' Zhang San ';
4、 Query all student information and student name as “ Zhang San ” Difference set of student information based on ( The difference set is the information one party has and the other party does not have ).
select * from student
minus
select * from student where name = ' Zhang San ';
3、 ... and 、 summary
The relevant contents here have not been sorted out yet , The article continues to be updated later , Recommended collection .
The commands involved in the article must be typed several times each like me , Only in the process of knocking can you find out whether you really master the command .
You can search by wechat 【 Xiaoqi JAVA interview 】 First time reading , reply 【 Information 】 Access to benefits , reply 【 project 】 Get the source code of the project , reply 【 The resume template 】 Get resume template , reply 【 Learning Roadmap 】 Get a learning roadmap .
边栏推荐
- 【TcaplusDB知识库】TcaplusDB新增机型介绍
- C語言學習-Day_04
- Tcp/ip explanation (version 2) notes / 3 link layer / 3.4 bridge and switch / 3.4.1 spanning tree protocol (STP)
- Leetcode 729. 我的日程安排表 I(牛逼,已解决)
- [tcapulusdb knowledge base] Introduction to tmonitor background one click installation (I)
- Ubuntu manually installing MySQL
- Leetcode 729. 我的日程安排表 I(提供一种思路)
- 上周热点回顾(6.20-6.26)
- Leetcode to do questions
- Ci/cd automatic test_ 16 best practices for CI / CD pipeline to accelerate test automation
猜你喜欢

数据库之元数据

Oracle trigger stored procedure writes at the same time

Multi thread implementation rewrites run (), how to inject and use mapper file to operate database

Metadata of database

多线程实现 重写run(),怎么注入使用mapper文件操作数据库

微软云 (Microsoft Cloud) 技术概述

NAACL 2022 | TAMT:通过下游任务无关掩码训练搜索可迁移的BERT子网络
Eureka核心源码解析

Exception in Chinese character fuzzy query of MySQL database

【HCIE-RS复习思维导图】- STP
随机推荐
KDD 2022 | 基于分层图扩散学习的癫痫波预测
Eureka核心源码解析
多线程实现 重写run(),怎么注入使用mapper文件操作数据库
【TcaplusDB知识库】Tmonitor单机安装指引介绍(二)
如何在 Methodot 中部署 JupyterLab?
oracle触发器 存储过程同时写入
[tcapulusdb knowledge base] Introduction to tmonitor stand-alone installation guidelines (II)
3D mobile translate3d
Leetcode to do questions
“全班29人24人成功读研”冲上热搜!剩下的5个人去哪了?
Mongodb cross host database copy and common commands
2021 CSP J2 entry group csp-s2 improvement group round 2 video and question solution
一篇抄十篇,CVPR Oral被指大量抄袭
Audiotrack and audiolinker
【TcaplusDB知识库】Tmonitor后台一键安装介绍(一)
mysql数据库汉字模糊查询出现异常
[methodot topic] what kind of low code platform is more suitable for developers?
Based on swift admin's rapid background development framework, I made a rookie tutorial [professional version]
JS client storage
[tcapulusdb knowledge base] tcapulusdb machine initialization and launch introduction