Multi-table joins are often encountered in work. Now, let's talk about the usage of LEFT, RIGHT and INNER JOIN. The difference will come out after the usage. The writing is not professional, just to facilitate understanding and learning.
First, let's talk about the use of INNER JOIN. INNER JOIN is to filter out the data with the same conditions in the two tables according to the ON condition , such as the Student table and the Course table as shown in the figure, to query those courses that Zhang Da has taken (for the convenience of using * to find out all the fields)
SELECT *
FROM Student s
INNER JOIN Course c
ON s. course number = c. course number
WHERE c. name="Zhang Da";
Analysis: The condition behind ON is s.course number=c.course number . According to the condition, the two tables are the same as " 1101 ", so the result is