띠

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

· 2015-10-29 (목) 17:27:38 · 2781
  •            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-12-13 조회 2,948
15-12-11 조회 3,417
15-12-11 조회 3,132
15-12-11 조회 2,958
15-12-11 조회 2,611
15-12-11 조회 2,574
15-12-11 조회 2,577
15-12-10 조회 2,533
15-12-10 조회 2,597
15-12-10 조회 2,568
15-12-10 조회 2,819
15-12-09 조회 2,729
15-12-08 조회 3,687
15-12-08 조회 2,942
15-12-08 조회 2,688
15-12-08 조회 2,967
15-12-07 조회 3,043
15-12-07 조회 2,755
15-12-07 조회 3,187
15-12-07 조회 2,786
15-12-06 조회 2,911
15-12-06 조회 2,627
15-12-06 조회 2,963
15-12-05 조회 2,790
15-12-05 조회 3,092
15-12-05 조회 2,813
15-12-04 조회 2,685
15-12-04 조회 2,793
15-12-04 조회 2,846
15-12-03 조회 2,798
15-12-03 조회 2,826
15-12-03 조회 2,871
15-12-03 조회 2,935
15-12-03 조회 3,210
15-12-03 조회 2,726
15-12-02 조회 2,967
15-12-02 조회 2,912
15-12-02 조회 2,884
15-12-02 조회 3,080
15-12-02 조회 3,224
15-12-01 조회 2,767
15-12-01 조회 2,561
15-12-01 조회 2,639
15-11-30 조회 2,823
15-11-30 조회 3,030
15-11-30 조회 2,896
15-11-29 조회 2,653
15-11-29 조회 2,912
15-11-29 조회 2,714
15-11-28 조회 2,650
15-11-28 조회 2,681
15-11-28 조회 2,715
15-11-27 조회 2,804
15-11-27 조회 2,659
15-11-27 조회 2,670
15-11-26 조회 2,847
15-11-26 조회 3,707
15-11-25 조회 2,806
15-11-25 조회 2,765
15-11-25 조회 2,820
15-11-25 조회 2,613
15-11-25 조회 2,975
15-11-23 조회 2,892
15-11-23 조회 3,069
15-11-23 조회 2,855
15-11-21 조회 2,760
15-11-21 조회 2,636
15-11-21 조회 2,579
15-11-20 조회 2,580
15-11-20 조회 2,526
15-11-20 조회 2,659
15-11-20 조회 2,919
15-11-18 조회 2,818
15-11-18 조회 2,694
15-11-18 조회 2,681
15-11-17 조회 2,883
15-11-17 조회 2,643
15-11-17 조회 2,777
15-11-16 조회 2,660
15-11-16 조회 2,627
15-11-16 조회 2,818
15-11-15 조회 2,822
15-11-15 조회 2,687
15-11-15 조회 2,866
15-11-13 조회 3,630
15-11-12 조회 3,517
15-11-12 조회 2,979
15-11-12 조회 3,651
15-11-11 조회 2,781
15-11-11 조회 3,031
15-11-11 조회 3,286
15-11-09 조회 2,800
15-11-09 조회 3,022
15-11-09 조회 3,006
15-11-09 조회 2,754
15-11-09 조회 2,800
15-11-09 조회 3,248
15-11-06 조회 3,394
15-11-05 조회 2,873
15-11-05 조회 2,728