띠

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

· 2015-10-29 (목) 17:27:38 · 2763
  •            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,530
15-12-13 조회 2,946
15-12-11 조회 2,607
15-12-11 조회 2,567
15-12-11 조회 2,571
15-12-10 조회 2,529
15-12-10 조회 2,587
15-12-10 조회 2,560
15-12-03 조회 3,203
15-12-03 조회 2,718
15-11-25 조회 2,800
15-11-09 조회 3,210
15-11-04 조회 2,971
15-06-09 조회 4,095
15-05-06 조회 5,093
15-03-28 조회 4,576
14-12-05 조회 4,999
14-10-25 조회 5,098
14-10-13 조회 4,273
14-10-03 조회 6,262
14-09-19 조회 4,966
14-09-18 조회 4,050
14-09-13 조회 4,615
14-09-03 조회 5,603
14-08-26 조회 4,210
14-08-26 조회 4,014
14-08-26 조회 3,979
14-08-11 조회 6,508
14-08-06 조회 4,127
14-08-06 조회 3,725
14-08-06 조회 3,938
14-08-01 조회 6,306
14-08-01 조회 3,843
14-07-30 조회 4,443
14-06-28 조회 5,167
14-06-28 조회 4,438
14-05-11 조회 4,592
14-05-09 조회 4,950
14-05-09 조회 7,713
14-04-30 조회 4,337
14-04-27 조회 4,197
14-04-25 조회 4,900
14-04-21 조회 3,878
14-04-21 조회 5,006
14-04-10 조회 4,604
14-04-01 조회 6,158
14-03-03 조회 3,533
14-02-25 조회 5,922
14-02-14 조회 5,196
14-02-13 조회 4,953
14-01-03 조회 4,446
13-12-06 조회 3,767
13-11-22 조회 5,522
13-11-18 조회 4,029
13-10-02 조회 4,448
13-10-02 조회 3,698
13-10-02 조회 3,962
13-10-02 조회 3,818
13-10-02 조회 4,183
13-09-16 조회 8,032
13-09-16 조회 5,397
13-08-18 조회 5,429
13-07-11 조회 4,111
13-07-10 조회 4,694
13-07-09 조회 4,733
13-07-09 조회 4,988
13-07-04 조회 4,487
13-07-04 조회 4,125
13-07-04 조회 4,239
13-07-01 조회 4,727
13-07-01 조회 4,560
13-07-01 조회 6,835
13-06-23 조회 4,383
13-06-05 조회 3,629
13-05-29 조회 4,870
13-05-10 조회 4,279
13-04-05 조회 4,899
13-04-05 조회 6,586
13-04-05 조회 1.1만
13-04-05 조회 7,182
13-04-05 조회 6,570
13-03-31 조회 5,839
13-03-31 조회 4,166
13-03-28 조회 4,528
13-03-28 조회 6,724
13-03-28 조회 9,207
13-03-28 조회 4,339
13-03-24 조회 3,955
13-03-21 조회 4,632
13-03-21 조회 1.8만
13-03-14 조회 3,938
13-03-10 조회 4,748
13-03-10 조회 4,507
13-03-10 조회 4,207
13-03-08 조회 5,264
13-03-08 조회 4,370
13-03-03 조회 5,026
13-03-03 조회 7,481
13-03-03 조회 4,222
13-03-03 조회 1.1만