mysql의 유용한 함수 find_in_set
구분자로 저장 되어있는 field가 있다면 해당 field값의 요소를 검색할때는 find_in_set 을 사용하여, 검색한 문자열을 포함하는 요소의 결과를 도출 할 수 있다.

find_in_set

select * from market where find_in_set('orange',unit) > 0;

e.g.


find_in_set_01
find_in_set_02

Translate