11. 18. 1. The SUBSTR Function |
|
The SUBSTR function returns part of a string. |
The general syntax of the function is as follows: |
SUBSTR(original string, begin [,how far]) |
An original string is to be dissected beginning at the begin character. |
If 'how far' amount is not specified, then the rest of the string from the begin point is retrieved. |
If begin is negative, then retrieval occurs from the right-hand side of original string. |
SQL> SELECT SUBSTR('My address is 123 Fourth St.',1,12)FROM dual
2 /
SUBSTR('MYAD
------------
My address i
SQL>
|
|