Vertica documentation is moving! Use our new documentation site at https://docs.rocketsoftware.com/bundle/vertica_24.2/page/index.html

BTRIM

Removes the longest string consisting only of specified characters from the start and end of a string.

Removes the longest string consisting only of specified characters from the start and end of a string.

Behavior type

Immutable

Syntax

BTRIM ( expression [ , characters-to-remove ] )

Arguments

expression
(CHAR or VARCHAR) is the string to modify
characters-to-remove
(CHAR or VARCHAR) specifies the characters to remove. The default is the space character.

Examples

=> SELECT BTRIM('xyxtrimyyx', 'xy');
 BTRIM
-------
 trim
(1 row)

See also