MSSQLString FunctionsREPLACE
TRIM

REPLACEString Functions

CHARINDEX

Replaces all occurrences of a substring.

Syntax

REPLACE(str, from, to)

Example

Enter values below to update the example in real time.

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