ltrim
function
Applies to: Databricks SQL Databricks Runtime
Returns str
with leading characters within trimStr
removed.
Syntax
ltrim( [trimstr ,] str)
Arguments
trimstr
: An optional STRING expression with the string to be trimmed.str
: A STRING expression from which to trim.
Returns
A STRING.
The default for trimStr
is a single space.
The function removes any leading characters within trimStr
from str
.
Examples
> SELECT '+' || ltrim(' SparkSQL ') || '+';
+SparkSQL +
> SELECT '+' || ltrim('abc', 'acbabSparkSQL ') || '+';
+SparkSQL +
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for