TRIM_BOTH
Removes all occurrences of the specified trim string from the beginning, end, or both sides of the string.
See also: TRIM
Syntax
TRIM_BOTH(<string>, <trim_string>)
Examples
SELECT TRIM_BOTH('xxdatalakexx', 'xxx'), TRIM_BOTH('xxdatalakexx', 'xx'), TRIM_BOTH('xxdatalakexx', 'x');
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ trim_both('xxdatalakexx', 'xxx') │ trim_both('xxdatalakexx', 'xx') │ trim_both('xxdatalakexx', 'x') │
├──────────────────────────────────┼─────────────────────────────────┼────────────────────────────────┤
│ xxdatalakexx │ datalake │ datalake │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘