REPLACE (Lakehouse v1)
Renvoie la chaîne str dont toutes les occurrences de la chaîne from_str sont remplacées par la chaîne to_str.
Syntaxe Analyze
Section intitulée « Syntaxe Analyze »func.replace(<str>, <from_str>, <to_str>)Exemples Analyze
Section intitulée « Exemples Analyze »func.replace(<str>, <from_str>, <to_str>)┌──────────────────────────────────────┐│ func.replace('plaidCloud', 'p', 'P') │├──────────────────────────────────────┤│ PlaidCloud │└──────────────────────────────────────┘Syntaxe SQL
Section intitulée « Syntaxe SQL »REPLACE(<str>, <from_str>, <to_str>)Arguments
Section intitulée « Arguments »| Arguments | Description |
|---|---|
<str> |
La chaîne. |
<from_str> |
La chaîne à remplacer. |
<to_str> |
La chaîne de remplacement. |
Type de retour
Section intitulée « Type de retour »VARCHAR
Exemples SQL
Section intitulée « Exemples SQL »SELECT REPLACE('www.mysql.com', 'w', 'Ww');┌─────────────────────────────────────┐│ REPLACE('www.mysql.com', 'w', 'Ww') │├─────────────────────────────────────┤│ WwWwWw.mysql.com │└─────────────────────────────────────┘