-
Many-to-Many SQL question
I'm an SQL newbie; I do OK with the simple stuff but I'm stuck on a complex query of a many to many table relationship.
I have three tables: (I've renamed them generically)
tblActors
PK = ActorID
tblMovies
PK = MovieID
tblActorsMovies (junction table)
PK = ActorID
PK = MovieID
I can easily get all the Movies any given Actor has been in, and I can get all the Actors who where in a particular Movie.
I need some SQL to find all of the Actors (ActorID's) that a particular Actor has ever been in a Movie with. i.e. I want all of the actors that have ever appeared in a movie (any and all movies) with John Travolta.
Thanks for any help you can offer.
Chris
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules