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
When the front-end and back-end interact, sometim...
introduction Looking back four years ago, when I ...
Content Detail Tags: <h1>~<h6>Title T...
When the above settings are used in IE8 and Chrome...
When the img src value is empty, two requests are ...
This article shares the specific code of Bootstra...
In real life, a lock is a tool we use when we wan...
1. Deploy nginx service in container The centos:7...
This tutorial shares the installation and configu...
Table of contents background Purpose Before split...
Table of contents Preface Why does limit deep pag...
Beautiful code is the foundation of a beautiful we...
1. Manually create and add my.ini file # CLIENT S...
This article uses examples to explain the princip...
The company had a well-configured server that was...