Skip to main content

TRIM_BOTH

Removes specific characters from both ends of a string.

See also: TRIM

Syntax

TRIM_BOTH(<string>, <trim_character>)

Examples

SELECT TRIM_BOTH('xxdatabendxx', 'xx');

┌─────────────────────────────────┐
│ trim_both('xxdatabendxx', 'xx')
├─────────────────────────────────┤
│ databend │
└─────────────────────────────────┘
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today