띠

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

· 2015-10-29 (목) 17:27:38 · 2718
  •            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,527
15-11-20 조회 2,485
15-11-20 조회 2,612
15-11-18 조회 2,765
15-11-18 조회 2,650
15-11-18 조회 2,630
15-11-17 조회 2,828
15-11-17 조회 2,583
15-11-17 조회 2,726
15-11-16 조회 2,613
15-11-16 조회 2,580
15-11-16 조회 2,771
15-11-15 조회 2,776
15-11-15 조회 2,639
15-11-15 조회 2,715
15-11-09 조회 2,921
15-11-09 조회 2,695
15-11-09 조회 2,746
15-11-06 조회 3,332
15-11-05 조회 2,783
15-11-05 조회 2,672
15-11-05 조회 2,794
15-11-04 조회 2,766
15-11-04 조회 2,825
15-11-04 조회 2,709
15-11-04 조회 3,034
15-11-04 조회 3,010
15-11-03 조회 2,819
15-11-02 조회 2,939
15-11-02 조회 2,685
15-11-02 조회 2,700
15-10-31 조회 2,552
15-10-27 조회 2,830
15-10-23 조회 2,779
15-10-23 조회 2,822
15-10-19 조회 3,985
15-10-15 조회 3,568
15-08-03 조회 3,131
15-07-29 조회 2,978
15-07-12 조회 3,621
15-05-07 조회 5,005
15-05-06 조회 4,639
15-05-06 조회 5,447
15-04-04 조회 4,519
15-04-04 조회 4,088
15-04-01 조회 5,796
15-02-10 조회 4,543
15-01-31 조회 4,556
15-01-23 조회 4,193
14-12-30 조회 3,835
14-12-23 조회 3,947
14-12-02 조회 4,237
14-10-17 조회 4,669
14-10-17 조회 4,982
14-10-07 조회 4,229
14-10-07 조회 5,432
14-10-04 조회 4,677
14-09-24 조회 4,766
14-09-24 조회 4,732
14-09-24 조회 4,205
14-09-23 조회 4,054
14-09-22 조회 3,810
14-09-21 조회 4,263
14-09-21 조회 4,313
14-09-21 조회 3,863
14-09-20 조회 4,409
14-09-19 조회 3,952
14-09-19 조회 3,584
14-09-19 조회 4,137
14-09-19 조회 3,882
14-09-18 조회 3,763
14-09-18 조회 4,039
14-09-18 조회 4,351
14-09-18 조회 3,936
14-09-18 조회 3,968
14-09-18 조회 3,946
14-09-18 조회 4,171
14-09-18 조회 4,785
14-09-17 조회 3,941
14-09-15 조회 3,872
14-09-11 조회 4,160
14-08-26 조회 4,045
14-08-26 조회 3,724
14-08-26 조회 3,613
14-08-26 조회 4,107
14-08-26 조회 3,877
14-08-26 조회 3,815
14-08-26 조회 4,005
14-08-26 조회 3,881
14-08-26 조회 3,676
14-08-26 조회 3,887
14-08-26 조회 3,962
14-08-26 조회 3,888
14-08-26 조회 3,914
14-08-26 조회 3,757
14-08-26 조회 3,723
14-08-26 조회 3,949
14-08-26 조회 3,606
14-08-26 조회 3,681
14-08-26 조회 3,571