Oracle8i SQL Reference Release 2 (8.1.6) A76989-01 |
|
Functions, 108 of 121
TRIM
enables you to trim leading or trailing characters (or both) from a character string. If trim_character or trim_source is a character literal, you must enclose it in single quotes.
LEADING
, Oracle removes any leading characters equal to trim_character.
TRAILING
, Oracle removes any trailing characters equal to trim_character.
BOTH
or none of the three, Oracle removes leading and trailing characters equal to trim_character.
VARCHAR2
. The maximum length of the value is the length of trim_source.
TRIM
function returns a null value.
This example trims leading and trailing zeroes from a number:
SELECT TRIM (0 FROM 0009872348900) "TRIM Example" FROM DUAL; TRIM example ------------ 98723489
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|