Skip to content
Advertisement

mySQL Self Join – inner join or join

quick clarification. When joining contents from the same table, must I always declare join type as INNER?

For example,

(on the table shown in this screenshot)

y

When I tried to remove the keyword INNER, it was wrong. Is it because JOIN does not exist in SQL?

Thanks and cheers.

Advertisement

Answer

You do want a self (inner) join here, but you are missing logic which limits each table to a certain year:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement