我将如何查询这 4 个表以查看Apocalypse Now中的演员?
Studio Table
studioID studioName
-------- --------
1 Lucasfilm
2 Amblin Entertainment
3 Zoetrope Studios
Movie Table
movieID movieName studioID castID
-------- -------- -------- --------
1 Star Wars 1 1
2 Indiana Jones 1 2
3 Back to the Future 2 3
4 Apocalypse Now 3 4
Cast Table
castID movieID actorID roleName
-------- -------- -------- --------
1 1 1 Han Solo
2 2 1 Indiana Jones
3 3 3 Doc Brown
4 4 1 Colonel Lucas
5 4 2 Tyrone Miller
Actor Table
actorID lastName firstName
-------- -------- --------
1 Ford Harrison
2 Fishburne Laurence
3 Lloyd Christopher
现在我在想:
SELECT Studio.studioName, Movie.movieName, Cast.roleName, Actor.firstName, Actor.lastname
FROM Studio, Movie, Actor, Cast
WHERE Cast.castID = Movie.castID and Movie.movieName = 'Apocalypse Now'
ORDER BY Actor.lastname
不太确定如何加入表格。
=.=.=.=.=.=.=.=.=