프로그래밍/SQL

프로그래밍/SQL

[postgreSQL] 문자열 패턴 매칭 , LIKE 대신 사용!

김쪼욘 2020. 6. 9. 01:41

postgre SQL에서 문자열 패턴 매칭을 하는 방법

# SQL
select a 
from data
where 'abc' like 'a%'

#postgre SQL
select a
from data
where 'abc' similar to '(a)%'
where 'abc' similar to '(a|b|c)%' # or 표현