This Oracle tutorial explains how to use the Oracle/PLSQL TRIM function with syntax and examples.
The Oracle/PLSQL TRIM function removes all specified characters either from the beginning or the end of a string.
The syntax for the TRIM function in Oracle/PLSQL is:
The function will remove trim_character from the front of string1.
The function will remove trim_character from the end of string1.
The function will remove trim_character from the front and end of string1.
The character that will be removed from string1. If this parameter is omitted, the TRIM function will remove space characters from string1.
The string to trim.
The TRIM function returns a string value.
The TRIM function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle TRIM function examples and explore how to use the TRIM function in Oracle/PLSQL.
For example: