The combination of Inner Join and Left Join and condition, innerjoin
When using relational databases, table join and filtering of result sets are essential query skills. Do you understand their usage? Let's try again.
Table creation and initialization:
Inner Join result set:
For Inner Join, conditions have the same effect in on or where.
Left Join result set:
The Left Join condition is in the On clause and is a base table.ConditionIt can be seen that it does not affect the master table. It is used to find the records that meet the conditions in the master table and then Join with the slave table.
The Left Join condition is in the On clause and is from the table.Condition, Still does not affect the master table, find the result set that meets the slave table Conditions
In the Where clause, the Left Join condition filters the result set after Left Join, which is relatively simple.
These are common usage and may be far from the expected results.