띠

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

· 2015-10-29 (목) 17:27:38 · 2761
  •            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,528
15-12-13 조회 2,939
15-12-11 조회 2,602
15-12-11 조회 2,564
15-12-11 조회 2,565
15-12-10 조회 2,525
15-12-10 조회 2,583
15-12-10 조회 2,558
15-12-03 조회 3,201
15-12-03 조회 2,718
15-11-25 조회 2,796
15-11-09 조회 3,204
15-11-04 조회 2,967
15-06-09 조회 4,090
15-05-06 조회 5,085
15-03-28 조회 4,573
14-12-05 조회 4,996
14-10-25 조회 5,090
14-10-13 조회 4,268
14-10-03 조회 6,253
14-09-19 조회 4,960
14-09-18 조회 4,050
14-09-13 조회 4,611
14-09-03 조회 5,597
14-08-26 조회 4,205
14-08-26 조회 4,009
14-08-26 조회 3,977
14-08-11 조회 6,502
14-08-06 조회 4,125
14-08-06 조회 3,721
14-08-06 조회 3,933
14-08-01 조회 6,302
14-08-01 조회 3,842
14-07-30 조회 4,437
14-06-28 조회 5,161
14-06-28 조회 4,434
14-05-11 조회 4,588
14-05-09 조회 4,945
14-05-09 조회 7,706
14-04-30 조회 4,326
14-04-27 조회 4,191
14-04-25 조회 4,895
14-04-21 조회 3,873
14-04-21 조회 5,002
14-04-10 조회 4,600
14-04-01 조회 6,155
14-03-03 조회 3,531
14-02-25 조회 5,918
14-02-14 조회 5,194
14-02-13 조회 4,949
14-01-03 조회 4,441
13-12-06 조회 3,765
13-11-22 조회 5,521
13-11-18 조회 4,026
13-10-02 조회 4,446
13-10-02 조회 3,693
13-10-02 조회 3,957
13-10-02 조회 3,815
13-10-02 조회 4,182
13-09-16 조회 8,028
13-09-16 조회 5,393
13-08-18 조회 5,425
13-07-11 조회 4,058
13-07-10 조회 4,689
13-07-09 조회 4,728
13-07-09 조회 4,987
13-07-04 조회 4,485
13-07-04 조회 4,121
13-07-04 조회 4,238
13-07-01 조회 4,724
13-07-01 조회 4,555
13-07-01 조회 6,830
13-06-23 조회 4,377
13-06-05 조회 3,625
13-05-29 조회 4,868
13-05-10 조회 4,273
13-04-05 조회 4,890
13-04-05 조회 6,577
13-04-05 조회 1.1만
13-04-05 조회 7,172
13-04-05 조회 6,563
13-03-31 조회 5,833
13-03-31 조회 4,160
13-03-28 조회 4,522
13-03-28 조회 6,719
13-03-28 조회 9,196
13-03-28 조회 4,333
13-03-24 조회 3,949
13-03-21 조회 4,624
13-03-21 조회 1.8만
13-03-14 조회 3,930
13-03-10 조회 4,745
13-03-10 조회 4,505
13-03-10 조회 4,202
13-03-08 조회 5,258
13-03-08 조회 4,367
13-03-03 조회 5,023
13-03-03 조회 7,475
13-03-03 조회 4,217
13-03-03 조회 1.1만