REPLACE (Lakehouse v1)
Returns the string str with all occurrences of the string from_str replaced by the string to_str.
Analyze Syntax
Section titled “Analyze Syntax”func.replace(<str>, <from_str>, <to_str>)Analyze Examples
Section titled “Analyze Examples”func.replace(<str>, <from_str>, <to_str>)┌──────────────────────────────────────┐│ func.replace('plaidCloud', 'p', 'P') │├──────────────────────────────────────┤│ PlaidCloud │└──────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”REPLACE(<str>, <from_str>, <to_str>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<str> | The string. |
<from_str> | The from string. |
<to_str> | The to string. |
Return Type
Section titled “Return Type”VARCHAR
SQL Examples
Section titled “SQL Examples”SELECT REPLACE('www.mysql.com', 'w', 'Ww');┌─────────────────────────────────────┐│ REPLACE('www.mysql.com', 'w', 'Ww') │├─────────────────────────────────────┤│ WwWwWw.mysql.com │└─────────────────────────────────────┘