11. 15. 1. The TRIM Function |
|
- TRIM removes characters from the left or right ends of a string or both ends.
- LTRIM and RTRIM trim characters from the left or right ends of strings.
- TRIM supercedes both of these.
|
The general syntax of TRIM is:
TRIM ([where] [trim character] FROM subject string) |
- The optional 'where' is one of the keywords "leading," "trailing," or "both."
- If the optional 'trim character' is not present, then blanks will be trimmed.
- 'Trim character' may be any character.
- The word FROM is necessary only if where or trim character is present.
|
SQL> SELECT TRIM (' AAA ') FROM dual;
TRI
---
AAA
SQL>
|
|