📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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('datalakexx', 'xxx'), TRIM_TRAILING('datalakexx', 'xx'), TRIM_TRAILING('datalakexx', 'x'); ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ trim_trailing('datalakexx', 'xxx') │ trim_trailing('datalakexx', 'xx') │ trim_trailing('datalakexx', 'x') │ ├────────────────────────────────────┼───────────────────────────────────┼──────────────────────────────────┤ │ datalakexx │ datalake │ datalake │ └───────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Was this page helpful?