MSSQL文字列関数REPLACE
TRIM

REPLACE文字列関数

CHARINDEX

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

構文

REPLACE(str, from, to)

使用例

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

phone_number
phone_plain
customers
SELECT REPLACE(phone_number, '-', '') AS phone_plain
FROM customers;