Book Contents

Book Index

Next Topic

Home

RTRIM

RTRIM returns a VARCHAR value representing a string with specific characters having been removed from the right side (end).

Syntax

RTRIM ( expression [ , characters ] )

Semantics

 

expression

(CHAR or VARCHAR) is the string to trim

characters

(CHAR or VARCHAR) specifies the characters to remove from the right side of expression. The default is the space character.

Examples

> SELECT RTRIM('trimzzzyyyyyyxxxxxxxx', 'xyz');

ltrim

-------

trim

(1 row)