The difference between on and where
When using left jion, the difference between on and where conditions is as follows:
1. The on condition is the condition used when generating the temporary table. It will return the records in the left table regardless of whether the condition in on is true or not.
2. The where condition is to filter the temporary table after the temporary table is generated. At this time, there is no meaning of left join (the records of the left table must be returned), and all the conditions are filtered out if the conditions are not true.
As shown below: the sixth line of query results
The query result in line 7 of the following figure