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

TRIM_LEADING



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

See also:

Syntax

TRIM_LEADING(<string>, <trim_string>)

Examples

SELECT TRIM_LEADING('xxdatalake', 'xxx'), TRIM_LEADING('xxdatalake', 'xx'), TRIM_LEADING('xxdatalake', 'x'); ┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ trim_leading('xxdatalake', 'xxx') │ trim_leading('xxdatalake', 'xx') │ trim_leading('xxdatalake', 'x') │ ├───────────────────────────────────┼──────────────────────────────────┼─────────────────────────────────┤ │ xxdatalake │ datalake │ datalake │ └────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Was this page helpful?