Trim Function Examples

Example PL/SQL query

select trim(' tutorial ') from dual;
Result: 'tutorial'
select trim(leading '1' from '111089711091') from dual;
Result: '089711091'
select trim(trailing '9' from 'Oracle9') from dual;
Result: 'Oracle'
select trim(both '1' from '111Oracle10G11') from dual;
Result: 'Oracle10G'