To inner join two tables, use the following syntax:
SELECT column(s)FROM table1INNER JOIN table2ON table1.column = table2.columnWHERE conditions ORDER BY column(s);
The preceding syntax shows you how to join two tables together with an INNER JOIN. You join a column in table1 that matches a column in table2. The WHERE and ORDER BY clauses are optional. They are there to show you that the INNER JOIN syntax goes between the FROM and WHERE clauses.
The following example will help you to understand how to use the INNER JOIN:
SELECT lahmansbaseballdb.people.playerid, birthyear, yearid, teamidFROM lahmansbaseballdb.appearancesINNER JOIN lahmansbaseballdb.peopleON lahmansbaseballdb.people.playerid = lahmansbaseballdb.appearances.playerid ...