띠

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

· 2015-10-29 (목) 17:27:38 · 2745
  •            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,820
15-11-05 조회 3,704
15-11-04 조회 2,794
15-11-04 조회 2,848
15-11-04 조회 2,732
15-11-04 조회 2,936
15-11-04 조회 3,128
15-11-04 조회 3,060
15-11-03 조회 2,898
15-11-03 조회 3,421
15-11-03 조회 3,040
15-11-02 조회 3,097
15-11-02 조회 2,651
15-11-02 조회 2,987
15-11-02 조회 2,712
15-11-02 조회 2,743
15-11-01 조회 2,962
15-10-31 조회 2,580
15-10-30 조회 3,268
15-10-30 조회 2,676
15-10-29 조회 2,929
15-10-29 조회 2,746
15-10-27 조회 2,859
15-10-26 조회 3,354
15-10-23 조회 2,803
15-10-23 조회 2,842
15-10-21 조회 2,598
15-10-19 조회 4,034
15-10-19 조회 3,257
15-10-18 조회 2,905
15-10-17 조회 2,962
15-10-17 조회 2,782
15-10-17 조회 2,902
15-10-15 조회 3,592
15-10-14 조회 3,478
15-10-07 조회 4,239
15-10-06 조회 3,323
15-10-05 조회 3,183
15-10-05 조회 3,585
15-10-05 조회 2,797
15-10-05 조회 2,898
15-10-05 조회 2,848
15-10-04 조회 2,692
15-10-04 조회 2,830
15-10-04 조회 2,986
15-10-03 조회 3,599
15-10-03 조회 2,816
15-10-02 조회 3,259
15-10-02 조회 3,105
15-10-02 조회 3,065
15-10-02 조회 2,772
15-10-01 조회 2,828
15-10-01 조회 2,882
15-10-01 조회 2,735
15-10-01 조회 2,716
15-10-01 조회 3,060
15-09-30 조회 2,650
15-09-30 조회 2,788
15-09-30 조회 2,866
15-09-30 조회 2,870
15-09-25 조회 3,520
15-09-25 조회 3,248
15-09-24 조회 2,816
15-09-24 조회 2,749
15-09-24 조회 3,209
15-09-23 조회 3,154
15-09-23 조회 2,660
15-09-23 조회 2,749
15-09-23 조회 2,724
15-09-23 조회 2,737
15-09-23 조회 2,943
15-09-23 조회 2,903
15-09-22 조회 4,936
15-09-21 조회 2,915
15-09-21 조회 2,668
15-09-21 조회 2,683
15-09-21 조회 2,746
15-09-18 조회 4,242
15-09-17 조회 3,914
15-09-16 조회 3,251
15-09-14 조회 3,592
15-09-14 조회 3,744
15-09-13 조회 3,785
15-09-11 조회 2,985
15-09-11 조회 2,685
15-09-09 조회 3,321
15-09-08 조회 2,767
15-09-05 조회 2,604
15-09-04 조회 2,865
15-09-02 조회 3,499
15-09-02 조회 3,250
15-09-02 조회 2,851
15-09-01 조회 3,332
15-08-31 조회 7,678
15-08-29 조회 2,928
15-08-29 조회 4,151
15-08-28 조회 3,261
15-08-28 조회 4,126
15-08-25 조회 3,776
15-08-24 조회 2,837