โ† All SQL Flashcard Decks

Filtering with WHERE Clause Flashcards

7 cards from real SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Filtering with WHERE Clause flashcards as text
  1. Which operator checks whether a column value falls within an inclusive range of two values?

    Answer: BETWEEN

    BETWEEN tests an inclusive range, so BETWEEN 10 AND 20 includes both 10 and 20.

  2. What does WHERE salary IN (3000, 4000, 5000) do?

    Answer: Returns rows where salary matches any value in the list

    IN returns rows where the column matches any one of the listed values.

  3. Which clause correctly filters for names starting with the letter 'A'?

    Answer: WHERE name LIKE 'A%'

    The % wildcard after A matches any sequence of characters following A.

  4. How do you select rows where the email column has no value?

    Answer: WHERE email IS NULL

    NULL comparisons require IS NULL because = NULL never evaluates true.

  5. In WHERE age > 18 AND city = 'NYC', which rows are returned?

    Answer: Only rows where both conditions are true

    AND requires both conditions to be true for a row to be included.

  6. Which wildcard in LIKE matches exactly one single character?

    Answer: Underscore (_)

    In standard SQL LIKE, the underscore matches exactly one character.

  7. What does WHERE NOT (status = 'active') return?

    Answer: Rows where status is not 'active'

    NOT negates the condition, returning rows where status is not 'active'.