RTRIM function
RTRIM is a string manipulation function that manipulates all data types (BIT, BLOB, and CHARACTER), and removes trailing singletons from a string.
Syntax
RTRIM returns a string value of the same data type and content as source_string but with any trailing default singletons removed. The term singleton refers to a single part (BIT, BLOB, or CHARACTER) within a string of that type.
The RTRIM function is equivalent to TRIM(TRAILING FROM source_string).
If the parameter is NULL, the result is NULL.
The default singleton
depends on the data type of source_string:
Data type of source string | Default singleton |
---|---|
Character | ' ' (space) |
BLOB | X'00' |
Bit | B'0' |