SQL SERVER||How to write CASE Statement in IN Clause?

preview_player
Показать описание
SELECT *,
CASE WHEN city IN('New York','Los Angeles','Chicago','Houston') THEN 'United States'
WHEN city IN('Mumbai','Delhi','Chennai','Kolkata') THEN 'India'
ELSE 'Australia'
END AS Country
FROM emp
Рекомендации по теме