띠

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

· 2015-10-29 (목) 17:27:38 · 2688
  •            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,777
15-11-05 조회 3,673
15-11-04 조회 2,746
15-11-04 조회 2,798
15-11-04 조회 2,694
15-11-04 조회 2,879
15-11-04 조회 3,005
15-11-04 조회 2,888
15-11-03 조회 2,789
15-11-03 조회 3,348
15-11-03 조회 2,994
15-11-02 조회 3,016
15-11-02 조회 2,564
15-11-02 조회 2,894
15-11-02 조회 2,654
15-11-02 조회 2,663
15-11-01 조회 2,894
15-10-31 조회 2,532
15-10-30 조회 3,183
15-10-30 조회 2,613
15-10-29 조회 2,861
15-10-29 조회 2,689
15-10-27 조회 2,809
15-10-26 조회 3,313
15-10-23 조회 2,755
15-10-23 조회 2,802
15-10-21 조회 2,548
15-10-19 조회 3,943
15-10-19 조회 3,209
15-10-18 조회 2,864
15-10-17 조회 2,912
15-10-17 조회 2,680
15-10-17 조회 2,797
15-10-15 조회 3,538
15-10-14 조회 3,428
15-10-07 조회 4,199
15-10-06 조회 3,248
15-10-05 조회 3,134
15-10-05 조회 3,546
15-10-05 조회 2,744
15-10-05 조회 2,842
15-10-05 조회 2,795
15-10-04 조회 2,640
15-10-04 조회 2,783
15-10-04 조회 2,934
15-10-03 조회 3,512
15-10-03 조회 2,763
15-10-02 조회 3,201
15-10-02 조회 3,062
15-10-02 조회 2,995
15-10-02 조회 2,693
15-10-01 조회 2,753
15-10-01 조회 2,806
15-10-01 조회 2,679
15-10-01 조회 2,667
15-10-01 조회 3,013
15-09-30 조회 2,585
15-09-30 조회 2,740
15-09-30 조회 2,816
15-09-30 조회 2,814
15-09-25 조회 3,480
15-09-25 조회 3,194
15-09-24 조회 2,772
15-09-24 조회 2,699
15-09-24 조회 3,150
15-09-23 조회 3,077
15-09-23 조회 2,605
15-09-23 조회 2,697
15-09-23 조회 2,670
15-09-23 조회 2,679
15-09-23 조회 2,871
15-09-23 조회 2,841
15-09-22 조회 4,863
15-09-21 조회 2,828
15-09-21 조회 2,599
15-09-21 조회 2,628
15-09-21 조회 2,689
15-09-18 조회 4,164
15-09-17 조회 3,881
15-09-16 조회 3,200
15-09-14 조회 3,563
15-09-14 조회 3,712
15-09-13 조회 3,756
15-09-11 조회 2,959
15-09-11 조회 2,658
15-09-09 조회 3,290
15-09-08 조회 2,743
15-09-05 조회 2,496
15-09-04 조회 2,841
15-09-02 조회 3,467
15-09-02 조회 3,212
15-09-02 조회 2,773
15-09-01 조회 3,292
15-08-31 조회 7,585
15-08-29 조회 2,891
15-08-29 조회 4,080
15-08-28 조회 3,214
15-08-28 조회 3,997
15-08-25 조회 3,702
15-08-24 조회 2,797