강의 컨설팅 트레이닝 무료진단 무료책자 마케팅편지 마케팅정보공유 다이어리 서비스제휴 고객센터

SUBSTRING(str,pos) , SUBSTRING(str FROM pos) , SUBSTRING(str,pos,len) , SUBSTRING(str FROM pos FOR len)
작성자 : 99 단국강토
등록날짜 : 2009.01.08 10:07
2,899

SUBSTRING(str,pos) , SUBSTRING(str FROM pos) , SUBSTRING(str,pos,len) , SUBSTRING(str FROM pos FOR len)

The forms without a len argument return a substring from string str starting at position pos. The forms with a len argument return a substring len characters long from string str, starting at position pos. The forms that use FROM are standard SQL syntax.

<PRE class=programlisting>mysql> SELECT SUBSTRING('Quadratically',5); -> 'ratically'mysql> SELECT SUBSTRING('foobarbar' FROM 4); -> 'barbar'mysql> SELECT SUBSTRING('Quadratically',5,6); -> 'ratica'</PRE>

This function is multi-byte safe.

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.

<PRE class=programlisting>mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', 2); -> 'www.mysql'mysql> SELECT SUBSTRING_INDEX('www.mysql.com', '.', -2); -> 'mysql.com'</PRE>

This function is multi-byte safe.

TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str) , TRIM(remstr FROM] str)

Returns the string str with all remstr prefixes and/or suffixes removed. If none of the specifiers BOTH, LEADING, or TRAILING is given, BOTH is assumed. If remstr is optional and not specified, spaces are removed.

<PRE class=programlisting>mysql> SELECT TRIM(' bar '); -> 'bar'mysql> SELECT TRIM(LEADING 'x' FROM 'xxxbarxxx'); -> 'barxxx'mysql> SELECT TRIM(BOTH 'x' FROM 'xxxbarxxx'); -> 'bar'mysql> SELECT TRIM(TRAILING 'xyz' FROM 'barxxyz'); -> 'barx'</PRE>

This function is multi-byte safe.

UCASE(str)

UCASE() is a synonym for UPPER().

UNCOMPRESS(string_to_uncompress)

[출처]  modestia2004

"쇼핑몰·홈페이지·오픈마켓
블로그·페이스북·이메일 등의 각종 마케팅 글쓰기,
각종 광고, 영업, 판매, 제안서, 전단지
반응율 3배×10배 이상 높이는 마법의 8단계 공식"
자세히보기

Comments

번호 제목 글쓴이 날짜 조회
2745 SSH 설명 13 김영철 01.29 2795
2744 간단한 쉘 명령어 13 김영철 01.29 2225
2743 ssh 명령어 13 김영철 01.29 2400
2742 my-sql 테이블 생성 방법 13 김영철 01.29 3075
2741 mysql 백업 및 복원 방법 13 김영철 01.24 2711
2740 sql_덤프하기_7_10_08 99 단국강토 01.12 1873
2739 Date Types_7_7_08 99 단국강토 01.12 3541
2738 13.1.7.1. JOIN Syntax____SELECT 99 단국강토 01.08 2209
열람중 SUBSTRING(str,pos) , SUBSTRING(str FROM pos) , SUBSTRING(str,pos,len) , SUBSTRING(str FROM pos FOR len) 99 단국강토 01.08 2900
2736 mysql함수 [숫자열, 문자열, 집계, 날짜, 기타함수...] 99 단국강토 01.07 4735
2735 sql ERROR 1045 99 단국강토 01.07 2567
2734 정규패턴, 자료백업 및 복구, MySQL 설정하기 99 단국강토 01.06 2696
2733 MySQL 시스템 데이터베이스 및 테이블 구조 이해하기 99 단국강토 01.06 2380
2732 TABLE 깨지고 맛간것 복구하기 99 단국강토 01.05 2331
2731 mysql의 최대 성능 향상 방법 99 단국강토 01.05 3562
2730 mysql FULLTEXT 검색 M 최고의하루 01.03 2832
2729 동적 쿼리 사용시 속도개선문제점 해결을 위한 방안... M 최고의하루 01.03 2486
2728 MySQL - Explain 정보보는법 99 단국강토 01.02 2439
2727 해당 문자의 Index 값알아 보자 99 단국강토 01.02 2281
2726 [SQL 쿼리문] 게시판에서 글쓰기와 답글을 저장할때 99 단국강토 12.30 2938
2725 EXPLAIN [mysql] 99 단국강토 12.30 2290
2724 unsigned M 최고의하루 12.26 2429
2723 우편번호 데이터 M 최고의하루 12.26 2786
2722 Mysql 문자셋 M 최고의하루 12.24 2383
2721 mysql 에서 utf-8 로 생성하기 M 최고의하루 12.24 2681
2720 utf-8 세팅및 한글깨짐방지 M 최고의하루 12.23 4615
2719 4.1 버전의 collation M 최고의하루 12.23 2430
2718 mysqladmin정리 M 최고의하루 12.20 2177
2717 카테고리4단 inner join 이해하기 M 최고의하루 12.20 2542
2716 MySQL-Front 3.2 설치 M 최고의하루 12.19 3230
마케팅
특별 마케팅자료
다운로드 마케팅자료
창업,경영
기획,카피,상품전략
동기부여,성취