Both are unions. The first is an explicit join, and the second is an implicit join and is an SQL antipater.
The second is bad because it is easy to get a random cross join. This is also bad, because when you want to cross-connect, it is unclear whether you want this or if you have a random one.
Further in the second style, if you need to convert to an external connection, you need to change all the connections in the query or get the wrong results. Thus, the second style is more difficult to maintain.
Explcit joins were introduced in the last century, why is someone still exploiting a bug-prone vulnerability, and itβs hard to maintain implicit joins β it's outside of me.
Hlgem source share