当前位置:网站首页>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 .
边栏推荐
- 深入理解 happens-before 原则
- [methodot topic] what kind of low code platform is more suitable for developers?
- 20 jeunes Pi recrutés par l'Institut de microbiologie de l'Académie chinoise des sciences, 2 millions de frais d'établissement et 10 millions de fonds de démarrage (à long terme)
- Memory compression for win10
- Analysis of mobile ar implementation based on edge computing (Part 2)
- 2021 CSP J2入门组 CSP-S2提高组 第2轮 视频与题解
- 多线程实现 重写run(),怎么注入使用mapper文件操作数据库
- go-zero微服务实战系列(七、请求量这么高该如何优化)
- JS client storage
- 居家办公竟比去公司上班还累? | 社区征文
猜你喜欢
Test how students participate in codereview
![[hcie-rs review mind map] - STP](/img/b5/b89e59fe7f23bf23feeadb991acba7.png)
[hcie-rs review mind map] - STP

直播電子商務應用程序開發需要什麼基本功能?未來發展前景如何?

Oracle trigger stored procedure writes at the same time

浅析基于边缘计算的移动AR实现(中)

User authentication technology

Working at home is more tiring than going to work at the company| Community essay solicitation
![leetcode:522. Longest special sequence II [greed + subsequence judgment]](/img/43/9b17e9cb5fee9d14c2986a2141889d.png)
leetcode:522. Longest special sequence II [greed + subsequence judgment]
![[tcapulusdb knowledge base] Introduction to tmonitor background one click installation (II)](/img/0a/742503e96a9b51735f5fd3f598b9af.png)
[tcapulusdb knowledge base] Introduction to tmonitor background one click installation (II)

【TcaplusDB知识库】Tmonitor后台一键安装介绍(二)
随机推荐
Go zero micro Service Practice Series (VII. How to optimize such a high demand)
Ubuntu manually installing MySQL
直播電子商務應用程序開發需要什麼基本功能?未來發展前景如何?
2-4 installation of Nessus under Kali
【云享新鲜】社区周刊·Vol.68-华为云招募工业智能领域合作伙伴,强力扶持+商业变现
多线程实现 重写run(),怎么注入使用mapper文件操作数据库
Deep learning in finance in cross sectional sectional predictions for random forests
Oracle-多表查询
Design and Simulation of direct torque control system for induction motor (motion control matlab/simulink)
Oracle连接MySQL报错IM002
leetcode:968. Monitor the binary tree [tree DP, maintain the three states of each node's subtree, it is very difficult to think of the right as a learning, analogous to the house raiding 3]
2021 CSP J2入门组 CSP-S2提高组 第2轮 视频与题解
Evolution of software system architecture
leetcode待做题目
如何在 Methodot 中部署 JupyterLab?
[tcapulusdb knowledge base] Introduction to new models of tcapulusdb
【TcaplusDB知识库】TcaplusDB机器初始化和上架介绍
上周热点回顾(6.20-6.26)
Go zero micro Service Practice Series (VII. How to optimize such a high demand)
ci/cd自动化测试_CI / CD管道加快测试自动化的16种最佳实践