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
The editor recently wanted to get started with th...
This article shares with you the specific code of...
Table of contents Preface Rolling principle accom...
Install mysql5.7 under win, for your reference, t...
Table of contents Create a vue + ts project using...
Table of contents Implementing state sharing base...
The code looks like this: SELECT @i:=@i+1 rowNum,...
#docker search #docker pull portainer 1. Download...
Table of contents Deploy nginx on server1 Deploy ...
Implementing responsive layout with CSS Responsiv...
Table of contents react-native project initializa...
This article uses examples to illustrate the prin...
<br />Navigation does not just refer to the ...
Commonly used JavaScript code to detect which ver...