left
function
Applies to: Databricks SQL Databricks Runtime
Returns the leftmost len
characters from str
.
Syntax
left(str, len)
Arguments
str
: A STRING expression.len
: An INTEGER expression.
Returns
A STRING.
If len
is less than 1, an empty string is returned.
Examples
> SELECT left('Spark SQL', 3);
Spa
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