Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLEXISTS vs INSingle-choice MCQ

Why does this query raise a type or comparison error in a strict SQL engine, even though every id clearly has a match by string?

-- users.id is INTEGER (1, 2, 3) -- blocked.user_ref is TEXT ('1', '2') SELECT u.id FROM users u WHERE u.id IN (SELECT user_ref FROM blocked);