Oracle SUBSTR

The Oracle SUBSTR function return a set of characters from an expression.

Oracle SUBSTR example

select 
substr('Reports are ready', 9, 3) 
from dual;

Result: 'are'

select 
substr('Reports are ready', 9) 
from dual;

Result: 'are ready'

select 
substr('OracleDatabase10G', 1, 6) 
from dual;

Result: 'Oracle'

select 
substr('OracleDatabase10G', -11, 8) 
from dual;

Result: 'Database'

select 
substr('OracleDatabase10G', 15, 3) 
from dual;

Result: '10G'