is on condition mandatory in inner join?
These join conditions define the rows in the outer table that take part in the match to the inner table. However, when a search condition is applied to the inner table in a WHERE clause, it should be applied in the ON clause as well.