3. 제목이 모음으로 끝나지 않는 영화

2024-12-18

select
	title
from
	film f
where
	f.rating in ('R', 'NC-17')
	and title not like '%A'
	and title not like '%E'
	and title not like '%I'
	and title not like '%O'
	and title not like '%U'

이거 말고 REGEXP를 써도 될 것 같다.

SELECT
    title
FROM
    film f
WHERE
    f.rating IN ('R', 'NC-17')
	AND NOT title REGEXP '[AEIOU]$'

훨씬 간단한데 왜 이생각을 못했니 ....