띠

필드 내용에서 특정문자열을 기준으로 문자열 자르기

· 2015-10-29 (목) 17:27:38 · 2741
  •            SUBSTRING_INDEX(str,delim,count)

    Returns the substring from string str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned. SUBSTRING_INDEX() performs a case-sensitive match when searching for delim.

    Press CTRL+C to copy
    mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2); -> 'www.mysql' mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', -2); -> 'mysql.com'

    This function is multibyte safe.

 

 

이렇게 좋은 기능이 있는지 처음 알았네요.

 

특정 필드를 전체 업데이트 하거나 할때 매우 유용하겠어요.

 

 

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
15-11-05 조회 2,818
15-11-05 조회 3,699
15-11-04 조회 2,792
15-11-04 조회 2,843
15-11-04 조회 2,729
15-11-04 조회 2,929
15-11-04 조회 3,122
15-11-04 조회 3,054
15-11-03 조회 2,892
15-11-03 조회 3,417
15-11-03 조회 3,035
15-11-02 조회 3,091
15-11-02 조회 2,649
15-11-02 조회 2,981
15-11-02 조회 2,710
15-11-02 조회 2,731
15-11-01 조회 2,957
15-10-31 조회 2,577
15-10-30 조회 3,263
15-10-30 조회 2,672
15-10-29 조회 2,925
15-10-29 조회 2,742
15-10-27 조회 2,858
15-10-26 조회 3,346
15-10-23 조회 2,795
15-10-23 조회 2,837
15-10-21 조회 2,591
15-10-19 조회 4,024
15-10-19 조회 3,253
15-10-18 조회 2,900
15-10-17 조회 2,956
15-10-17 조회 2,775
15-10-17 조회 2,901
15-10-15 조회 3,590
15-10-14 조회 3,477
15-10-07 조회 4,236
15-10-06 조회 3,314
15-10-05 조회 3,181
15-10-05 조회 3,582
15-10-05 조회 2,792
15-10-05 조회 2,891
15-10-05 조회 2,839
15-10-04 조회 2,691
15-10-04 조회 2,824
15-10-04 조회 2,982
15-10-03 조회 3,595
15-10-03 조회 2,812
15-10-02 조회 3,253
15-10-02 조회 3,102
15-10-02 조회 3,061
15-10-02 조회 2,768
15-10-01 조회 2,822
15-10-01 조회 2,874
15-10-01 조회 2,731
15-10-01 조회 2,711
15-10-01 조회 3,054
15-09-30 조회 2,642
15-09-30 조회 2,786
15-09-30 조회 2,861
15-09-30 조회 2,865
15-09-25 조회 3,511
15-09-25 조회 3,243
15-09-24 조회 2,813
15-09-24 조회 2,748
15-09-24 조회 3,203
15-09-23 조회 3,153
15-09-23 조회 2,659
15-09-23 조회 2,743
15-09-23 조회 2,722
15-09-23 조회 2,733
15-09-23 조회 2,940
15-09-23 조회 2,900
15-09-22 조회 4,931
15-09-21 조회 2,905
15-09-21 조회 2,663
15-09-21 조회 2,682
15-09-21 조회 2,741
15-09-18 조회 4,232
15-09-17 조회 3,909
15-09-16 조회 3,246
15-09-14 조회 3,592
15-09-14 조회 3,738
15-09-13 조회 3,783
15-09-11 조회 2,982
15-09-11 조회 2,685
15-09-09 조회 3,315
15-09-08 조회 2,766
15-09-05 조회 2,600
15-09-04 조회 2,862
15-09-02 조회 3,496
15-09-02 조회 3,248
15-09-02 조회 2,849
15-09-01 조회 3,325
15-08-31 조회 7,675
15-08-29 조회 2,925
15-08-29 조회 4,149
15-08-28 조회 3,259
15-08-28 조회 4,122
15-08-25 조회 3,770
15-08-24 조회 2,833