띠

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

· 2015-10-29 (목) 17:27:38 · 2768
  •            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건
+
제목 글쓴이 날짜 조회
16-06-11 조회 3,075
16-02-15 조회 3,304
16-02-02 조회 2,974
16-01-25 조회 2,588
16-01-18 조회 2,695
16-01-08 조회 2,607
16-01-07 조회 2,617
16-01-05 조회 2,653
16-01-05 조회 2,952
16-01-05 조회 2,926
16-01-05 조회 2,806
16-01-04 조회 2,667
16-01-04 조회 2,673
16-01-04 조회 2,622
16-01-04 조회 2,535
15-12-30 조회 2,887
15-12-24 조회 2,700
15-12-24 조회 2,697
15-12-24 조회 2,725
15-12-24 조회 2,678
15-12-23 조회 2,668
15-12-16 조회 2,761
15-12-15 조회 2,823
15-12-11 조회 2,948
15-12-10 조회 2,810
15-11-09 조회 2,792
15-11-09 조회 3,014
15-10-06 조회 3,351
15-10-02 조회 3,129
15-05-29 조회 4,462
15-02-02 조회 4,439
15-01-18 조회 4,425
14-10-25 조회 8,382
14-10-25 조회 5,162
14-10-22 조회 7,167
14-10-22 조회 4,867
14-10-22 조회 4,822
14-10-18 조회 5,688
14-10-17 조회 6,065
14-10-17 조회 5,447
14-10-17 조회 8,980
14-10-17 조회 6,459
14-10-13 조회 4,386
14-10-13 조회 4,487
14-10-07 조회 6,162
14-09-24 조회 3,932
14-09-23 조회 3,996
14-09-22 조회 4,903
14-09-22 조회 6,135
14-09-22 조회 4,100
14-09-22 조회 3,771
14-09-21 조회 4,393
14-09-21 조회 3,875
14-09-20 조회 3,879
14-09-20 조회 3,783
14-09-20 조회 3,961
14-09-19 조회 3,884
14-09-19 조회 4,048
14-09-19 조회 3,932
14-09-19 조회 4,313
14-09-19 조회 3,955
14-09-19 조회 3,884
14-09-19 조회 4,168
14-09-19 조회 3,901
14-09-19 조회 3,948
14-09-19 조회 3,937
14-09-18 조회 4,014
14-09-18 조회 3,969
14-09-18 조회 4,238
14-09-18 조회 4,203
14-09-18 조회 4,217
14-09-18 조회 4,914
14-09-18 조회 5,469
14-09-18 조회 5,357
14-09-18 조회 4,158
14-09-18 조회 4,652
14-09-18 조회 4,269
14-08-30 조회 5,538
14-08-06 조회 6,023
14-08-06 조회 5,638
14-08-03 조회 5,275
14-06-12 조회 5,545
14-05-11 조회 3,731
14-05-11 조회 4,492
14-05-11 조회 4,595
14-05-09 조회 1.3만
14-05-01 조회 5,193
14-03-30 조회 4,397
14-03-23 조회 8,019
14-02-12 조회 3,901
13-10-29 조회 7,862
13-10-28 조회 8,688
13-09-29 조회 6,656
13-09-29 조회 4,285
13-07-23 조회 5,158
13-07-23 조회 1.2만
13-07-14 조회 4,690
13-07-14 조회 5,079
13-07-14 조회 6,042
13-07-14 조회 5,320