일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- Oracle
- Date and Time Function
- 방화벽
- SVN
- 티베로
- 전자정부표준프레임워크
- 오라클
- String Functions and Operators
- String Functions and Date Operators
- Sring Functions and Operators
- Data and Time Functions
- MySQL
- Date and Time Functions
- 윈도우
- Tibero
- String Function and Operators
- 전자정부 표준프레임워크
- HTTP
- Today
- Total
웹이야기
[MySQL] INSTR() 본문
MySQL 문자열 함수와 연산자
INSTR()
-
INSTR(str, substr)
의 형태
Returns the position of the first occurence of sustring substr in string str. This is the same as the two-argument form of LOCATE(), except that the order of the arguments is reversed.
This function is multibyte safe, and is case-sensitive only if at least one argument is a binary string.
mysql> SELECT INSTR('foobarbar', 'bar') ;
+---------------------------+
| INSTR('foobarbar', 'bar') |
+---------------------------+
| 4 |
+---------------------------+
1 row in set (0.00 sec)
mysql> SELECT INSTR('xbar', 'foobar') ;
+-------------------------+
| INSTR('xbar', 'foobar') |
+-------------------------+
| 0 |
+-------------------------+
1 row in set (0.00 sec)
mysql> SELECT INSTR('한글', '한') ;
+------------------------+
| INSTR('한글', '한') |
+------------------------+
| 1 |
+------------------------+
1 row in set (0.00 sec)
'D > MySQL' 카테고리의 다른 글
[MySQL] LEFT() (0) | 2020.04.14 |
---|---|
[MySQL] LCASE() (0) | 2020.04.13 |
[MySQL] INSERT() (0) | 2020.04.13 |
[MySQL] HEX() (0) | 2020.04.13 |
MySQL FROM_BASE64() (0) | 2020.04.13 |