1-- For Oracle only
2
3-- syntax
4SUBSTR(<main-string>,1,<number-of-characters>)
5
6-- example
7SUBSTR('Useless stuff',1,10) -- OUTPUT: Useless st
8
9-- practical example
10SELECT SUBSTR('Useless stuff',1,10)
11FROM DUAL;
1-- For Oracle only
2
3-- syntax
4SUBSTR(<main-string>,-<number-of-characters>)
5
6-- example
7SUBSTR('Useless stuff',-9) -- OUTPUT: ess stuff
8
9-- practical example
10SELECT SUBSTR('Useless stuff',-9)
11FROM DUAL;