This example trims leading and trailing zeroes from a number:SELECT TRIM (0 FROM 0009872348900) "TRIM Example" FROM DUAL;TRIM Example ------------ 98723489 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The following example trims all of the left-most x's and y's from a string:SELECT LTRIM('xyxXxyLAST WORD','xy') "LTRIM example" FROM DUAL;LTRIM example ------------ XxyLAST WORD ___________ The following example trims the letters "xy" from the right side of a string:SELECT RTRIM('BROWNINGyxXxy','xy') "RTRIM example" FROM DUAL;
FROM DUAL;TRIM Example
------------
98723489
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The following example trims all of the left-most x's and y's from a string:SELECT LTRIM('xyxXxyLAST WORD','xy') "LTRIM example"
FROM DUAL;LTRIM example
------------
XxyLAST WORD
___________
The following example trims the letters "xy" from the right side of a string:SELECT RTRIM('BROWNINGyxXxy','xy') "RTRIM example"
FROM DUAL;
RTRIM examp
-----------
BROWNINGyxX