LTRIM,去掉左邊指定的字串,預設為空白值
select ltrim ('aaabbbccc','aaa') from dual;
結果:bbbccc
select ltrim ( ' aaabbbccc') from dual;
結果:aaabbbccc
RTRIM,去掉右邊指定的字串,預設為空白值
select rtrim('aaabbbccc','ccc' ) from dual;
結果:aaabbb
select ltrim ( 'aaabbbccc ') from dual;
結果:aaabbbccc
去掉左右邊的空白,只能同時使用LTRIM、RTRIM
select rtrim(ltrim ( ' aaabbbccc ')) from dual;
結果:aaabbbccc