Select values that have all ID from array

We have a table film_actor that represents many to many relationship between films and actors.

 

Suppose, we want to find all films where the only actors from a given array { 5, 8, 10 } were starring:

 

The next query will return the same films:

Leave a Reply

Your email address will not be published. Required fields are marked *