Inner join or cross join Confusion
The first query is the same as an INNER JOIN, the second query is not valid because it is using ON without a JOIN statement.

From a similar question:


  The comma operator is equivalent to an [INNER] JOIN operator. The
  comma is the older style join operator. The JOIN keyword was added
  later, and is favored because it also allows for OUTER join operations


Source

Testing db&lt;>fiddle