TRIM
Purpose
This function deletes all of the characters specified in the expression, trim_string
, from both the right and left border of string.
Syntax
trim::=
or
trim::=
Usage Notes
- If
trim_string
is not specified, then the spacing characters are deleted. - You can use either of the syntax diagrams.
Example
SELECT TRIM('abcdef', 'acf') "TRIM";
SELECT TRIM(LEADING '1' FROM '1234567891');
SELECT TRIM(TRAILING '1' FROM '1234567891');
SELECT TRIM(BOTH '1' FROM '1234567891');