INNER JOIN for 3 tables I am doing a small course in SQL during my academic degree, I am very new with this material.



I saw Inner joinning 3 tables on StackOverflow, I tried to do INNER JOIN between my three tables, the INNER JOIN between the two tables are working well, but when I am adding the thired it's not working well, maybe I missed something?

this one is working:

 SELECT Actors.FirstName,Actors.LastName
 FROM Actors
 INNER JOIN ActorsMovies  ON Actors.ActorID= ActorsMovies.ActorID;


this one doesn't work, I get an error message that something is missing:

 SELECT Actors.FirstName,Actors.LastName
 FROM Actors
 INNER JOIN ActorsMovies  ON Actors.ActorID= ActorsMovies.ActorID
 INNER JOIN GenresMovies ON ActorsMovies.MovieID=GenresMovies.MovieID;
You could need brackets.
Try this:

SELECT Actors.FirstName,Actors.LastName
FROM ((Actors
INNER JOIN ActorsMovies  ON Actors.ActorID= ActorsMovies.ActorID)
INNER JOIN GenresMovies ON ActorsMovies.MovieID=GenresMovies.MovieID);