Skip to content
Advertisement

Is there a way to use a table value attribute in where clause in SQL

I’m very new to SQL and i feel like this is a dumb question because I couldn’t find an answer to it…

I have this table in a SQL query:

I want to write a query where I get only the movies with length bigger than that of “Star Wars”. Is there another way to do it instead of “WHERE length > 124” where I put something like a variable after ‘>’ rather than a number

Advertisement

Answer

Probably easiest with a subquery:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement