MySQL文字列関数REPLACE
RTRIM

REPLACE文字列関数

INSTR

部分文字列を置換します。

構文

REPLACE(str, from, to)

使用例

下記の値を入力するとサンプルに即時反映されます。

phone
phone_plain
customers
-- 전화번호 하이픈 제거
SELECT REPLACE(phone, '-', '') AS phone_plain
FROM customers;