폰박사 [휴대폰사용 18년차 블로거]

Select * FROM user
    Where (name RLIKE '^(ㄱ|ㄲ)' OR ( name >= '가' AND name < '나' ))
        and (name RLIKE '^ㄴ' OR ( name >= '나' AND name < '다' ))
        and (name RLIKE '^(ㄷ|ㄸ)' OR ( name >= '다' AND name < '라' ))
        and (name RLIKE '^ㄹ' OR ( name >= '라' AND name < '마' ))
        and (name RLIKE '^ㅁ' OR ( name >= '마' AND name < '바' ))
        and (name RLIKE '^ㅂ' OR ( name >= '바' AND name < '사' ))
        and (name RLIKE '^(ㅅ|ㅆ)' OR ( name >= '사' AND name < '아' ))
        and (name RLIKE '^ㅇ' OR ( uname >= '아' AND name < '자' ))
        and (name RLIKE '^(ㅈ|ㅉ)' OR ( name >= '자' AND name < '차' ))
        and (name RLIKE '^ㅊ' OR ( name >= '차' AND name < '카' ))
        and (name RLIKE '^ㅋ' OR ( name >= '카' AND name < '타' ))
        and (name RLIKE '^ㅌ' OR ( name >= '타' AND name < '파' ))
        and (name RLIKE '^ㅍ' OR ( name >= '파' AND name < '하' ))
        and (name RLIKE '^ㅎ' OR ( name >= '하'))
    order by name


이 문구를 잘 활용하면 됩니다.

저작자 표시 비영리 변경 금지
신고

Comment +0