띠

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

· 2015-10-29 (목) 17:27:38 · 2744
  •            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,702
15-11-04 조회 2,794
15-11-04 조회 2,847
15-11-04 조회 2,732
15-11-04 조회 2,933
15-11-04 조회 3,127
15-11-04 조회 3,059
15-11-03 조회 2,898
15-11-03 조회 3,421
15-11-03 조회 3,040
15-11-02 조회 3,096
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,745
15-10-27 조회 2,859
15-10-26 조회 3,352
15-10-23 조회 2,803
15-10-23 조회 2,841
15-10-21 조회 2,598
15-10-19 조회 4,033
15-10-19 조회 3,257
15-10-18 조회 2,903
15-10-17 조회 2,960
15-10-17 조회 2,781
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,182
15-10-05 조회 3,584
15-10-05 조회 2,797
15-10-05 조회 2,898
15-10-05 조회 2,847
15-10-04 조회 2,692
15-10-04 조회 2,830
15-10-04 조회 2,985
15-10-03 조회 3,599
15-10-03 조회 2,815
15-10-02 조회 3,258
15-10-02 조회 3,105
15-10-02 조회 3,062
15-10-02 조회 2,772
15-10-01 조회 2,828
15-10-01 조회 2,881
15-10-01 조회 2,734
15-10-01 조회 2,715
15-10-01 조회 3,059
15-09-30 조회 2,650
15-09-30 조회 2,788
15-09-30 조회 2,866
15-09-30 조회 2,870
15-09-25 조회 3,517
15-09-25 조회 3,248
15-09-24 조회 2,815
15-09-24 조회 2,749
15-09-24 조회 3,209
15-09-23 조회 3,154
15-09-23 조회 2,660
15-09-23 조회 2,747
15-09-23 조회 2,724
15-09-23 조회 2,737
15-09-23 조회 2,942
15-09-23 조회 2,902
15-09-22 조회 4,936
15-09-21 조회 2,913
15-09-21 조회 2,668
15-09-21 조회 2,683
15-09-21 조회 2,745
15-09-18 조회 4,239
15-09-17 조회 3,913
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,318
15-09-08 조회 2,767
15-09-05 조회 2,604
15-09-04 조회 2,864
15-09-02 조회 3,499
15-09-02 조회 3,250
15-09-02 조회 2,850
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,775
15-08-24 조회 2,836