「Oracle」case whenの使い方
1.単純 CASE 式
CASE sex
WHEN '1’ THEN 'female’
WHEN '2’ THEN 'male’
ELSE 'other’ END
2.検索 CASE 式
CASE
WHEN sex = '1’ THEN 'female’
WHEN sex = '2’ THEN 'male’
ELSE 'other’ END
Coding Changes the World
1.単純 CASE 式
CASE sex
WHEN '1’ THEN 'female’
WHEN '2’ THEN 'male’
ELSE 'other’ END
2.検索 CASE 式
CASE
WHEN sex = '1’ THEN 'female’
WHEN sex = '2’ THEN 'male’
ELSE 'other’ END