D/MySQL
[MySQL] REPLACE()
yeon.Biju
2020. 4. 20. 12:09
MySQL 문자열 함수와 연산자
REPLACE()
- 문자열 치환
REPLACE(str, from_str, to_str)
의 형태
Returns the string str with all occurences of the string from_str replaced by string to_str. REPLACE() performs a case-sensitive match when searching for from_str.
mysql> SELECT REPLACE('오늘은 검색 오늘은', '오늘은', '내일은');
+-----------------------------------------------------------------+
| REPLACE('오늘은 검색 오늘은', '오늘은', '내일은') |
+-----------------------------------------------------------------+
| 내일은 검색 내일은 |
+-----------------------------------------------------------------+
1 row in set (0.00 sec)
This function is multibyte safe.