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

RTRIM



Removes all occurrences of any character present in the specified trim string from the right side of the string.

See also:

Syntax

RTRIM(<string>, <trim_string>)

Examples

SELECT RTRIM('datalakexx', 'x'), RTRIM('datalakexx', 'xy'); ┌──────────────────────────────────────────────────────┐ │ rtrim('datalakexx', 'x') │ rtrim('datalakexx', 'xy') │ ├──────────────────────────┼───────────────────────────┤ │ datalake │ datalake │ └──────────────────────────────────────────────────────┘

Was this page helpful?