can't determine proper JOIN query construct
Hello, I have a newbie question: Running Mariadb 10.4, I'm using a baseball database containing 22 tables. All of the tables have a column named 'playerID'. What I'm trying to do is return results from two tables ('Batting' and 'Fielding') for a specific playerID (i.e. show the results for a specific playerID from both tables in one table) using a JOIN query. There are plenty of generic solutions on the net, but I have yet to find one that explains exactly what each segment of this query means. I thought this query would work, but apparently there's a syntax error:
select playerID from Batting, inner join Fielding on Batting.playerID = Fielding.playerID;
TIA for any help provided.
The syntax error probably points you to the part of the query with the mistake. In this case, you have a comma after
from Batting which shouldn't be there. See Joining Tables with JOIN Clauses for more examples.