Noun:
Inner Connection: Natural connection, only two matching rows can be displayed in the result set
Outer connection: Left outer connection, right connection, full outer connection
Inner JOIN, only columns that satisfy the WHERE condition are displayed select a.*,b.* from a inner join B on a.id=b.parent_id
Left outer connection, select a.*,b.* from a LEFT join B on a.id=b.parent_id column is the main, the right table is a secondary table.
Right outer join, select a.*,b.* from a R join B on a.id=b.parent_id left column as secondary table, right table Main table
Full outer JOIN, select a.*,b.* from a full join B on a.id=b.parent_id returns all values of the left and right tables, or NULL when a table has no matching value in a different table
Note: MySQL does not support full join,
Practice Operation: 1, internal connection SELECT Student.name,teacher.high from student INNER JOIN teacher on Student.id=teacher.id;
2. Left outer connection SELECT Student.name,teacher.high from student to teacher on Student.id=teacher.id;
3. Right outer connection SELECT Student.name,teacher.high from student R join teacher on Student.id=teacher.id;
Problems encountered during Operation: 1066th error occurred, just started to be unable to display the same column, the actual statement is missing on
MySQL learning inside and outside connection statements