In Oracle, the use of the trim () function has a leading beginning character, a trailing end character, a both beginning and a trailing character, as follows:
Trim (Leading | | trailing | | Both the character that will be replaced "from" the string to be replaced ")
1. Trim function to remove the specified opening character
Select Trim (Leading ' x ' from ' Xday ') as strtemp from TableName;
2. Trim function to remove specified end character
Select Trim (trailing ' x ' from ' Dayx ') as strtemp from TableName;
3. Trim function removes the specified header and trailing characters
Select Trim (both ' x ' from ' Xdayx ') as strtemp from TableName;
4, by default, the TRIM function will remove the header and tail, the specified character
Select Trim (' x ' from ' Xdayx ') as strtemp from TableName;
5. If the removed character is not specified, the header and trailing spaces are removed by default
Select Trim (' Day ') as strtemp from TableName;
Use of the trim () function