REPLACE (Lakehouse v1)
文字列 str に含まれる文字列 from_str をすべて文字列 to_str に置き換えた結果を返します。
Analyze の構文
Section titled “Analyze の構文”func.replace(<str>, <from_str>, <to_str>)Analyze の例
Section titled “Analyze の例”func.replace(<str>, <from_str>, <to_str>)┌──────────────────────────────────────┐│ func.replace('plaidCloud', 'p', 'P') │├──────────────────────────────────────┤│ PlaidCloud │└──────────────────────────────────────┘REPLACE(<str>, <from_str>, <to_str>)| 引数 | 説明 |
|---|---|
<str> |
文字列。 |
<from_str> |
置換前の文字列。 |
<to_str> |
置換後の文字列。 |
VARCHAR
SELECT REPLACE('www.mysql.com', 'w', 'Ww');┌─────────────────────────────────────┐│ REPLACE('www.mysql.com', 'w', 'Ww') │├─────────────────────────────────────┤│ WwWwWw.mysql.com │└─────────────────────────────────────┘