Skip to main content

TRIM_TRAILING

Removes all occurrences of the specified trim string from the end of the string.

See also:

Syntax

TRIM_TRAILING(<string>, <trim_string>)

Examples

SELECT TRIM_TRAILING('databendxx', 'xxx'), TRIM_TRAILING('databendxx', 'xx'), TRIM_TRAILING('databendxx', 'x');

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ trim_trailing('databendxx', 'xxx') │ trim_trailing('databendxx', 'xx') │ trim_trailing('databendxx', 'x')
├────────────────────────────────────┼───────────────────────────────────┼──────────────────────────────────┤
│ databendxx │ databend │ databend │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today