the_prole
the_prole

Reputation: 8945

How to select a column where other columns have specific values

Can I do something like this

SELECT Actors FROM Movies WHERE Genre, ReleaseDate = SciFi, 1994

I want all actors that are in SciFi movies released in 1994

Upvotes: 0

Views: 24

Answers (2)

CL.
CL.

Reputation: 180020

In SQLite 3.15.0 or later, you can use row values:

SELECT Actors
FROM Movies
WHERE (Genre, ReleaseDate) = ('SciFi', 1994);

Upvotes: 1

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520928

Your syntax is a bit off. Use this:

SELECT Actors
FROM Movies
WHERE Genre = 'SciFi' AND
      ReleaseDate = 1994

Upvotes: 1

Related Questions