DB2 Version 9.7 for Linux, UNIX, and Windows

RTRIM (SYSFUN schema) scalar function

Read syntax diagramSkip visual syntax diagram
>>-RTRIM--(--expression--)-------------------------------------><

The schema is SYSFUN.

Returns the characters of the argument with trailing blanks removed.

expression
The expression can be of any built-in character string data type. For a VARCHAR the maximum length is 4 000 bytes and for a CLOB the maximum length is 1 048 576 bytes.
The result of the function is:
  • VARCHAR(4000) if expression is VARCHAR (not exceeding 4 000 bytes) or CHAR
  • CLOB(1M) if expression is CLOB or LONG VARCHAR

The result can be null; if expression is null, the result is the null.