SUBSTRING_INDEX(str,delim,count)Returns the substring from string
strbeforecountoccurrences of the delimiterdelim. Ifcountis positive, everything to the left of the final delimiter (counting from the left) is returned. Ifcountis negative, everything to the right of the final delimiter (counting from the right) is returned.SUBSTRING_INDEX()performs a case-sensitive match when searching fordelim.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.
이렇게 좋은 기능이 있는지 처음 알았네요.
특정 필드를 전체 업데이트 하거나 할때 매우 유용하겠어요.
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5777 | 10년 전 | 442 | ||
| 5776 | 10년 전 | 295 | ||
| 5775 | 10년 전 | 224 | ||
| 5774 | 10년 전 | 901 | ||
| 5773 | 10년 전 | 260 | ||
| 5772 | 10년 전 | 289 | ||
| 5771 | 10년 전 | 403 | ||
| 5770 | 10년 전 | 349 | ||
| 5769 | 10년 전 | 208 | ||
| 5768 | 10년 전 | 264 | ||
| 5767 | 10년 전 | 1138 | ||
| 5766 | 10년 전 | 370 | ||
| 5765 | 10년 전 | 451 | ||
| 5764 | 10년 전 | 414 | ||
| 5763 | 10년 전 | 366 | ||
| 5762 | 10년 전 | 221 | ||
| 5761 | 10년 전 | 361 | ||
| 5760 | 10년 전 | 410 | ||
| 5759 | 10년 전 | 830 | ||
| 5758 | 10년 전 | 307 | ||
| 5757 | 10년 전 | 378 | ||
| 5756 | 10년 전 | 342 | ||
| 5755 | 10년 전 | 361 | ||
| 5754 | 10년 전 | 239 | ||
| 5753 | 10년 전 | 416 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기