rtrim
function
Applies to: Databricks SQL Databricks Runtime
Returns str
with trailing characters removed.
Syntax
rtrim( [trimStr ,] str)
Arguments
trimStr
: An optionalSTRING
expression with characters to be trimmed. The default is a space character.str
: ASTRING
expression to be trimmed.
Returns
A STRING
.
The function removes any trailing characters within trimStr
from str
.
Examples
> SELECT rtrim('SparkSQL ') || '+';
SparkSQL+
> SELECT rtrim('ab', 'SparkSQLabcaaba');
SparkSQLabc
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