띠

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

· 2015-10-29 (목) 17:27:38 · 2719
  •            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,794
15-11-05 조회 3,683
15-11-04 조회 2,766
15-11-04 조회 2,825
15-11-04 조회 2,709
15-11-04 조회 2,901
15-11-04 조회 3,035
15-11-04 조회 3,011
15-11-03 조회 2,819
15-11-03 조회 3,383
15-11-03 조회 3,012
15-11-02 조회 3,051
15-11-02 조회 2,619
15-11-02 조회 2,939
15-11-02 조회 2,686
15-11-02 조회 2,701
15-11-01 조회 2,935
15-10-31 조회 2,552
15-10-30 조회 3,223
15-10-30 조회 2,640
15-10-29 조회 2,889
15-10-29 조회 2,720
15-10-27 조회 2,830
15-10-26 조회 3,332
15-10-23 조회 2,780
15-10-23 조회 2,822
15-10-21 조회 2,568
15-10-19 조회 3,986
15-10-19 조회 3,231
15-10-18 조회 2,881
15-10-17 조회 2,935
15-10-17 조회 2,752
15-10-17 조회 2,883
15-10-15 조회 3,568
15-10-14 조회 3,459
15-10-07 조회 4,216
15-10-06 조회 3,295
15-10-05 조회 3,164
15-10-05 조회 3,560
15-10-05 조회 2,771
15-10-05 조회 2,870
15-10-05 조회 2,815
15-10-04 조회 2,665
15-10-04 조회 2,808
15-10-04 조회 2,958
15-10-03 조회 3,543
15-10-03 조회 2,783
15-10-02 조회 3,236
15-10-02 조회 3,086
15-10-02 조회 3,035
15-10-02 조회 2,730
15-10-01 조회 2,795
15-10-01 조회 2,836
15-10-01 조회 2,707
15-10-01 조회 2,692
15-10-01 조회 3,029
15-09-30 조회 2,609
15-09-30 조회 2,759
15-09-30 조회 2,839
15-09-30 조회 2,840
15-09-25 조회 3,496
15-09-25 조회 3,217
15-09-24 조회 2,789
15-09-24 조회 2,724
15-09-24 조회 3,175
15-09-23 조회 3,111
15-09-23 조회 2,628
15-09-23 조회 2,720
15-09-23 조회 2,695
15-09-23 조회 2,707
15-09-23 조회 2,907
15-09-23 조회 2,862
15-09-22 조회 4,886
15-09-21 조회 2,866
15-09-21 조회 2,632
15-09-21 조회 2,650
15-09-21 조회 2,715
15-09-18 조회 4,196
15-09-17 조회 3,896
15-09-16 조회 3,220
15-09-14 조회 3,579
15-09-14 조회 3,722
15-09-13 조회 3,766
15-09-11 조회 2,970
15-09-11 조회 2,674
15-09-09 조회 3,301
15-09-08 조회 2,755
15-09-05 조회 2,510
15-09-04 조회 2,851
15-09-02 조회 3,481
15-09-02 조회 3,233
15-09-02 조회 2,828
15-09-01 조회 3,311
15-08-31 조회 7,640
15-08-29 조회 2,912
15-08-29 조회 4,109
15-08-28 조회 3,239
15-08-28 조회 4,089
15-08-25 조회 3,736
15-08-24 조회 2,817