In Oracle/plsql, the trim function removes all specified characters either from the beginning or the ending of a string.
The syntax for the TRIM function is:
Trim ([Leading|trailing|both[trim_character]] string1)
Leading-remove trim_string from the front of string1.
Trailing-remove trim_string from the end of string1.
Both-remove trim_string from the front and end of string1.
If None of these are chosen (ie:leading, trailing, both), the TRIM function would remove trim_string from both the front a nd end of string1.
Trim_character is the character that would be removed from string1. If This parameter is omitted, the trim function would remove all leading and trailing spaces from string1.
String1 is the string to trim.
For example:
Trim (' tech ') would return ' tech '
Trim (' from ' tech ') would return ' tech '
Trim (Leading ' 0 ' 000123 ') would return ' 123 '
Trim (trailing ' 1 ' Tech1 ') would return ' Tech '
Trim (both ' 1 ' 123tech111 ') would return ' 23Tech '