[SQL문제풀기] 제목이 모음으로 끝나지 않는 영화

silver's avatar
Mar 02, 2025
[SQL문제풀기] 제목이 모음으로 끝나지 않는 영화

문제

SQLite

: 정규식은 지원하지 않음

내가 작성한 정답

select title from film where 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'

내가 작성한 정답2 - substr사용

: Mysql에서는 substring , Oracle에서는 substr
select title from film where rating in ('R','NC-17') and substr(title,-1) not in ('A','E','I','O','U')
Share article

silver