There are two tables, and the records in table A may not exist in table B.
For example: student table
class table c
In the table above, record number 5 in table s cannot be found in table c. 1. Left join: the left side of the left join is the main table, and if there is no corresponding secondary table, NULL is displayed. SELECT s.`name`,s.`class_id` FROM student s LEFT JOIN class c ON s.`class_id`=c.`class_id` result
2. Right join: the right side of the right join is the primary table, and if there is no corresponding secondary table, NULL is displayed. SELECT s.`name`,s.`class_id` FROM student s RIGHT JOIN class c ON s.`class_id`=c.`class_id` result
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Quickly solve the problem of slow Tomcat startup, super simple
>>: Detailed explanation of axios encapsulation and API interface management in React project
First, let’s understand what MySQL is? MySQL is a...
Table of contents Preface Demonstration effect HT...
Since Zabbix version 3.0, it has supported encryp...
Using the official MySQL image requires some modi...
English: A link tag will automatically complete h...
10.4.1 The difference between Frameset and Frame ...
Background color and transparency settings As sho...
Two cases: 1. With index 2. Without index Prerequ...
1. First go to the official website https://www.p...
In web page production, displaying and hiding ele...
1. Modify the Linux server docker configuration f...
Specific method: First open the command prompt; T...
Table of contents background: need: Effect 1. Ide...
After installing Navicat The following error may ...
IE8 will have multiple compatibility modes . IE pl...