In a SQL query, can we write conditions that utilize both
Yes, queries can combine multiple conditions using
OR without a real limit to how many conditions you can combine. However, the more conditions you combine, the more specific the results will be and the more complex it can get.
/* This will select movies with id values from 10 to 20 inclusive, OR with id values from 50 to 60 inclusive. */ SELECT * FROM movies WHERE (id > 10 AND id < 20) OR (id > 50 AND id < 60);