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
No more nonsense, post code HTML part <div cla...
Through JavaScript, we can prevent hyperlinks fro...
When href is needed to pass parameters, and the p...
Table of contents Download and install JDK Downlo...
Table of contents 1. Click on the menu to jump 1....
Introduction: The configuration of Docker running...
First look at the example code: #/bin/bash cal da...
Because the router at home forced to reduce the b...
hint This plug-in can only be accessed under the ...
After installing VMware and creating a new virtua...
Official website explanation: When a component is...
Detailed explanation of mysql count The count fun...
text 1) Download the Ubuntu image docker pull ubu...
Table of contents 1. List interface and other mod...
The requirements are as follows Export the table ...