띠

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

· 2015-10-29 (목) 17:27:38 · 2684
  •            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,776
15-11-05 조회 3,673
15-11-04 조회 2,746
15-11-04 조회 2,796
15-11-04 조회 2,694
15-11-04 조회 2,879
15-11-04 조회 3,005
15-11-04 조회 2,884
15-11-03 조회 2,789
15-11-03 조회 3,347
15-11-03 조회 2,994
15-11-02 조회 3,016
15-11-02 조회 2,559
15-11-02 조회 2,890
15-11-02 조회 2,654
15-11-02 조회 2,662
15-11-01 조회 2,888
15-10-31 조회 2,532
15-10-30 조회 3,183
15-10-30 조회 2,612
15-10-29 조회 2,861
15-10-29 조회 2,685
15-10-27 조회 2,808
15-10-26 조회 3,312
15-10-23 조회 2,752
15-10-23 조회 2,801
15-10-21 조회 2,548
15-10-19 조회 3,941
15-10-19 조회 3,209
15-10-18 조회 2,864
15-10-17 조회 2,912
15-10-17 조회 2,674
15-10-17 조회 2,795
15-10-15 조회 3,538
15-10-14 조회 3,427
15-10-07 조회 4,199
15-10-06 조회 3,247
15-10-05 조회 3,133
15-10-05 조회 3,546
15-10-05 조회 2,744
15-10-05 조회 2,842
15-10-05 조회 2,793
15-10-04 조회 2,640
15-10-04 조회 2,782
15-10-04 조회 2,934
15-10-03 조회 3,511
15-10-03 조회 2,763
15-10-02 조회 3,198
15-10-02 조회 3,061
15-10-02 조회 2,995
15-10-02 조회 2,691
15-10-01 조회 2,753
15-10-01 조회 2,806
15-10-01 조회 2,679
15-10-01 조회 2,666
15-10-01 조회 3,011
15-09-30 조회 2,585
15-09-30 조회 2,739
15-09-30 조회 2,813
15-09-30 조회 2,814
15-09-25 조회 3,478
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,668
15-09-23 조회 2,679
15-09-23 조회 2,870
15-09-23 조회 2,838
15-09-22 조회 4,862
15-09-21 조회 2,828
15-09-21 조회 2,599
15-09-21 조회 2,628
15-09-21 조회 2,687
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,288
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,766
15-09-01 조회 3,292
15-08-31 조회 7,581
15-08-29 조회 2,891
15-08-29 조회 4,080
15-08-28 조회 3,214
15-08-28 조회 3,993
15-08-25 조회 3,702
15-08-24 조회 2,797