띠

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

· 2015-10-29 (목) 17:27:38 · 2632
  •            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-20 조회 2,470
15-11-20 조회 2,448
15-11-20 조회 2,573
15-11-18 조회 2,578
15-11-18 조회 2,606
15-11-18 조회 2,562
15-11-17 조회 2,795
15-11-17 조회 2,547
15-11-17 조회 2,510
15-11-16 조회 2,571
15-11-16 조회 2,545
15-11-16 조회 2,743
15-11-15 조회 2,745
15-11-15 조회 2,579
15-11-15 조회 2,664
15-11-09 조회 2,856
15-11-09 조회 2,642
15-11-09 조회 2,701
15-11-06 조회 3,290
15-11-05 조회 2,729
15-11-05 조회 2,637
15-11-05 조회 2,747
15-11-04 조회 2,713
15-11-04 조회 2,694
15-11-04 조회 2,670
15-11-04 조회 2,982
15-11-04 조회 2,774
15-11-03 조회 2,762
15-11-02 조회 2,819
15-11-02 조회 2,597
15-11-02 조회 2,618
15-10-31 조회 2,511
15-10-27 조회 2,787
15-10-23 조회 2,691
15-10-23 조회 2,746
15-10-19 조회 3,839
15-10-15 조회 3,450
15-08-03 조회 3,094
15-07-29 조회 2,922
15-07-12 조회 3,403
15-05-07 조회 4,976
15-05-06 조회 4,599
15-05-06 조회 5,332
15-04-04 조회 4,413
15-04-04 조회 4,044
15-04-01 조회 5,651
15-02-10 조회 4,403
15-01-31 조회 4,426
15-01-23 조회 4,103
14-12-30 조회 3,649
14-12-23 조회 3,814
14-12-02 조회 4,190
14-10-17 조회 4,622
14-10-17 조회 4,772
14-10-07 조회 4,130
14-10-07 조회 5,323
14-10-04 조회 4,420
14-09-24 조회 4,703
14-09-24 조회 4,675
14-09-24 조회 4,154
14-09-23 조회 3,951
14-09-22 조회 3,609
14-09-21 조회 4,014
14-09-21 조회 4,240
14-09-21 조회 3,732
14-09-20 조회 4,300
14-09-19 조회 3,831
14-09-19 조회 3,517
14-09-19 조회 4,022
14-09-19 조회 3,705
14-09-18 조회 3,529
14-09-18 조회 3,967
14-09-18 조회 4,266
14-09-18 조회 3,867
14-09-18 조회 3,838
14-09-18 조회 3,879
14-09-18 조회 3,966
14-09-18 조회 4,717
14-09-17 조회 3,716
14-09-15 조회 3,816
14-09-11 조회 4,100
14-08-26 조회 3,984
14-08-26 조회 3,682
14-08-26 조회 3,461
14-08-26 조회 3,972
14-08-26 조회 3,820
14-08-26 조회 3,710
14-08-26 조회 3,798
14-08-26 조회 3,850
14-08-26 조회 3,640
14-08-26 조회 3,844
14-08-26 조회 3,853
14-08-26 조회 3,832
14-08-26 조회 3,860
14-08-26 조회 3,639
14-08-26 조회 3,636
14-08-26 조회 3,822
14-08-26 조회 3,524
14-08-26 조회 3,599
14-08-26 조회 3,397