| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 윈도우
- Date and Time Function
- 방화벽
- 전자정부 표준프레임워크
- 전자정부표준프레임워크
- String Functions and Operators
- Sring Functions and Operators
- 티베로
- Data and Time Functions
- Tibero
- MySQL
- String Function and Operators
- 오라클
- SVN
- HTTP
- Date and Time Functions
- String Functions and Date Operators
- Oracle
- Today
- Total
웹이야기
[MySQL] INSERT() 본문
MySQL 문자열 함수와 연산자
INSERT()
-
INSERT(str, pos, len, newstr)
의 형태
Returns the string str, with the substring beginning at position pos and len characters long replaced by the string newstr. Returns the original string if pos is not within the length of the string Replaces the rest of the string from position pos if len is not within the length of the rest of the string. Returns NULL if any argument is NULL.
This function is multibyte safe.
mysql> SELECT INSERT('Quadratic', 3, 4, 'What') ;
+-----------------------------------+
| INSERT('Quadratic', 3, 4, 'What') |
+-----------------------------------+
| QuWhattic |
+-----------------------------------+
1 row in set (0.00 sec)
mysql> SELECT INSERT('Quadratic', -1, 4, 'What') ;
+------------------------------------+
| INSERT('Quadratic', -1, 4, 'What') |
+------------------------------------+
| Quadratic |
+------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT INSERT('Quadratic', 3, 100, 'What') ;
+-------------------------------------+
| INSERT('Quadratic', 3, 100, 'What') |
+-------------------------------------+
| QuWhat |
+-------------------------------------+
1 row in set (0.00 sec)
'D > MySQL' 카테고리의 다른 글
| [MySQL] LCASE() (0) | 2020.04.13 |
|---|---|
| [MySQL] INSTR() (0) | 2020.04.13 |
| [MySQL] HEX() (0) | 2020.04.13 |
| MySQL FROM_BASE64() (0) | 2020.04.13 |
| [MySQL] FORMAT() (0) | 2020.04.13 |