관리 메뉴

ふたりで

mysql 컬럼의 특정문자 일괄 치환하기 REPLACE 본문

mariadb

mysql 컬럼의 특정문자 일괄 치환하기 REPLACE

graykang 2020. 4. 27. 15:26
728x90
반응형
SMALL

update goods
set goods.goods_name = REPLACE(goods.goods_name,"'","`");  =>작은 따옴표를 ` 로 치환

해당 컬럼의 문자에서 ' 를 `로 치환한다.

select goods_name from goods where goods_name like("%`%"); 치환 된데이터 확이해보기

728x90
반응형
LIST
Comments