QuestionQ96

VerifiedUsing Subqueries to Solve Queries

Refer to the exhibit and examine the descriptions of the SALES and PROMOTIONS tables.

Question Image

You want to delete rows from the SALES table where the PROMO_NAME column in the PROMOTIONS table has either blowout sale or everyday low price as values. Which three DELETE statements are valid?

Question Image

Choose three
Explanation

A DELETE WHERE clause can contain subqueries. The required condition is an either/or match for the two promotion names. Using OR between the two promo-ID comparisons, or using IN with a subquery that returns promo IDs for either name, selects sales rows associated with either promotion. Combining the two comparisons with AND instead requires the same PROMO_ID to equal both promotion IDs and therefore does not satisfy the required either/or condition.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!