SELECT ANIMAL_ID, NAME,
CASE WHEN SEX_UPON_INTAKE LIKE 'Intact%' THEN 'X'
ELSE 'O'
END
FROM ANIMAL_INS
ORDER BY ANIMAL_ID;
SELECT ANIMAL_ID, NAME,
CASE WHEN SEX_UPON_INTAKE NOT LIKE 'Intact%' THEN 'O'
ELSE 'X'
END
FROM ANIMAL_INS
ORDER BY ANIMAL_ID;
LIKE
의 부정은 NOT LIKE
이다.