RTRIM() function removes the trailing whitespace from a specified string in the selected column.
Syntax
rtrim(expr)
Arguments
Argument
Description
expr
Any string expression.
Returns
Data type
Value
string
expr with trailing whitespace removed.
Examples
Trim column strings
createtablesegments(_idid,segmentstring);insertintosegments(_id,segment)values(1,' green ')select_id,rtrim(segment)asTrimmedStrfromsegments;+-----+------------+|_id|TrimmedStr|+-----+------------+|1|green|+-----+------------+