띠

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

· 2015-10-29 (목) 17:27:38 · 2748
  •            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,821
15-11-05 조회 3,705
15-11-04 조회 2,794
15-11-04 조회 2,849
15-11-04 조회 2,733
15-11-04 조회 2,939
15-11-04 조회 3,137
15-11-04 조회 3,062
15-11-03 조회 2,899
15-11-03 조회 3,424
15-11-03 조회 3,043
15-11-02 조회 3,101
15-11-02 조회 2,653
15-11-02 조회 2,989
15-11-02 조회 2,712
15-11-02 조회 2,746
15-11-01 조회 2,966
15-10-31 조회 2,582
15-10-30 조회 3,269
15-10-30 조회 2,678
15-10-29 조회 2,934
15-10-29 조회 2,749
15-10-27 조회 2,861
15-10-26 조회 3,354
15-10-23 조회 2,805
15-10-23 조회 2,844
15-10-21 조회 2,598
15-10-19 조회 4,036
15-10-19 조회 3,260
15-10-18 조회 2,909
15-10-17 조회 2,966
15-10-17 조회 2,785
15-10-17 조회 2,902
15-10-15 조회 3,593
15-10-14 조회 3,482
15-10-07 조회 4,242
15-10-06 조회 3,326
15-10-05 조회 3,185
15-10-05 조회 3,585
15-10-05 조회 2,800
15-10-05 조회 2,900
15-10-05 조회 2,849
15-10-04 조회 2,697
15-10-04 조회 2,830
15-10-04 조회 2,987
15-10-03 조회 3,603
15-10-03 조회 2,816
15-10-02 조회 3,261
15-10-02 조회 3,106
15-10-02 조회 3,069
15-10-02 조회 2,772
15-10-01 조회 2,829
15-10-01 조회 2,883
15-10-01 조회 2,737
15-10-01 조회 2,719
15-10-01 조회 3,062
15-09-30 조회 2,652
15-09-30 조회 2,791
15-09-30 조회 2,867
15-09-30 조회 2,870
15-09-25 조회 3,523
15-09-25 조회 3,249
15-09-24 조회 2,818
15-09-24 조회 2,750
15-09-24 조회 3,209
15-09-23 조회 3,155
15-09-23 조회 2,662
15-09-23 조회 2,750
15-09-23 조회 2,725
15-09-23 조회 2,739
15-09-23 조회 2,944
15-09-23 조회 2,908
15-09-22 조회 4,943
15-09-21 조회 2,915
15-09-21 조회 2,671
15-09-21 조회 2,686
15-09-21 조회 2,747
15-09-18 조회 4,244
15-09-17 조회 3,918
15-09-16 조회 3,252
15-09-14 조회 3,598
15-09-14 조회 3,745
15-09-13 조회 3,789
15-09-11 조회 2,988
15-09-11 조회 2,686
15-09-09 조회 3,322
15-09-08 조회 2,768
15-09-05 조회 2,605
15-09-04 조회 2,865
15-09-02 조회 3,500
15-09-02 조회 3,253
15-09-02 조회 2,853
15-09-01 조회 3,337
15-08-31 조회 7,679
15-08-29 조회 2,928
15-08-29 조회 4,152
15-08-28 조회 3,264
15-08-28 조회 4,127
15-08-25 조회 3,779
15-08-24 조회 2,837