This article refer to http://blog.csdn.net/indexman/article/details/7748766
The syntax is described as follows:
TRIM ([{{leading | TRAILING | BOTH} [Trim_character] | Trim_character} from] trim_source)
Parameter explanation:
Leading opening character
Trailing End character
Both opening and ending characters
Trim_character Removal of characters
Trim_source Trim Source
Select Trim (Leading ' x ' from ' Xhellox ') from Dual;--helloxselect trim (trailing ' x ' from ' Xhellox ') from Dual;--xhelloselec T trim (both ' x ' from ' Xhellox ') from Dual;--helloselect trim (' x ' from ' Xhellox ') from Dual;--helloselect trim (' Xhellox ') From Dual;--xhelloxselect trim (trailing from ' Xhellox ') from Dual;--xhelloxselect trim (trailing ' x ' from null) from Dua L;--emptyselect trim (trailing null from ' Xhellox ') from Dual;--empty
Oracle Trim functions